Projet

Général

Profil

Bug #70884

restore d'un snapshot, erreur au load (Page.MultipleObjectsReturned: get() returned more than one Page -- it returned 2!)

Ajouté par Sentry Io il y a plus d'un an. Mis à jour il y a plus d'un an.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Version cible:
-
Début:
31 octobre 2022
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:
Non

Description

https://sentry.entrouvert.org/entrouvert/publik/issues/96493/

Page.MultipleObjectsReturned: get() returned more than one Page -- it returned 2!
(10 additional frame(s) were not displayed)
...
  File "combo/data/models.py", line 777, in load_page
    page = Page.load_serialized_page(json_page, snapshot=snapshot)
  File "combo/data/models.py", line 573, in load_serialized_page
    page, created = Page.objects.get_or_create(slug=json_page['fields']['slug'], snapshot=snapshot)
  File "django/db/models/manager.py", line 82, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "django/db/models/query.py", line 538, in get_or_create
    return self.get(**kwargs), False
  File "django/db/models/query.py", line 410, in get
    raise self.model.MultipleObjectsReturned(

Fichiers

Révisions associées

Révision 3ad0a23f (diff)
Ajouté par Lauréline Guérin il y a plus d'un an

data: fix snapshot restore with duplicated slug (#70884)

Historique

#1

Mis à jour par Lauréline Guérin il y a plus d'un an

  • Projet changé de Suivi des traces à Combo
  • Sujet changé de Page.MultipleObjectsReturned: get() returned more than one Page -- it returned 2! à visualisation d'une snapshot, erreur au load (Page.MultipleObjectsReturned: get() returned more than one Page -- it returned 2!)

Comportement à vérifier: la page loadée a le même slug qu'une autre page (mais le parent est certainement différent)

#2

Mis à jour par Lauréline Guérin il y a plus d'un an

  • Sujet changé de visualisation d'une snapshot, erreur au load (Page.MultipleObjectsReturned: get() returned more than one Page -- it returned 2!) à restore d'un snapshot, erreur au load (Page.MultipleObjectsReturned: get() returned more than one Page -- it returned 2!)
  • Assigné à mis à Lauréline Guérin
#3

Mis à jour par Lauréline Guérin il y a plus d'un an

#4

Mis à jour par Frédéric Péters il y a plus d'un an

  • Statut changé de Solution proposée à Solution validée

(typo dans le message de commit, fic → fix)

#5

Mis à jour par Lauréline Guérin il y a plus d'un an

  • Statut changé de Solution validée à Résolu (à déployer)
commit 3ad0a23f71b3a09d46741af1a18e8c9741eaa936
Author: Lauréline Guérin <zebuline@entrouvert.com>
Date:   Thu Nov 3 21:01:30 2022 +0100

    data: fix snapshot restore with duplicated slug (#70884)

(typo corrigée)

#6

Mis à jour par Transition automatique il y a plus d'un an

  • Statut changé de Résolu (à déployer) à Solution déployée
#7

Mis à jour par Transition automatique il y a plus d'un an

Automatic expiration

Formats disponibles : Atom PDF