Projet

Général

Profil

Development #45296

crash sur l'inspect d'une demande faisant référence à une fiche si celle-ci a été effacée (lors de l'affichage des live)

Ajouté par Thomas Noël il y a presque 4 ans. Mis à jour il y a presque 4 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Version cible:
-
Début:
20 juillet 2020
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:
Non

Description

Il semble que l'affichage des "live" faisse planter la vue inspect d'une demande si celle-ci fait référence à une fiche (en tant que source de donnée d'une liste) si cette fiche n'existe plus.

Trace quand on va dans /inspect, qui parle de "form_var_date_selectionne_live" (date_selectionne = champ liste avec source de donnée "carddef:")

Exception:
  type = '<class 'KeyError'>', value = ''form_var_date_selectionne_live''

Stack trace (most recent call first):
  File "/usr/lib/python3/dist-packages/wcs/qommon/substitution.py", line 214, in __getitem__
   212                         # TypeError will happen if indexing is used on a string
   213                         if i == 1:
>  214                             raise KeyError(key)
   215                     else:
   216                         parts = parts[i:]

  locals: 
     __class__ = <class 'wcs.qommon.substitution.CompatibilityNamesDict'>
     current_dict = <wcs.variables.LazyFieldVarStructured object at 0x7fa795f66438>
     i = 1
     key = 'form_var_date_selectionne_live'
     part = 'live'
     parts = ['live']
     self = {'form': <wcs.variables.LazyFormData object at 0x7fa796899630>, 'attachments': <wcs.workflows.AttachmentsSubstitutionProxy object at 0x7fa795fa9278>}

  File "/usr/lib/python3/dist-packages/wcs/qommon/substitution.py", line 171, in flatten
   169             if not depth:
   170                 return
>  171             item = self[base]
   172             flat_keys[base] = item
   173             if hasattr(item, 'inspect_keys'):

  locals: 
     base = 'form_var_date_selectionne_live'
     depth = 7
     flat_keys = {'form': <wcs.variables.LazyFormData object at 0x7fa796899630>, ...}
     flatten = <function CompatibilityNamesDict.get_flat_keys.<locals>.flatten at 0x7fa7968ed488>
     self = {'form': <wcs.variables.LazyFormData object at 0x7fa796899630>, 'attachments': <wcs.workflows.AttachmentsSubstitutionProxy object at 0x7fa795fa9278>}

  File "/usr/lib/python3/dist-packages/wcs/qommon/substitution.py", line 187, in flatten
   185                 new_base = '%s_%s' % (base, sub_key)
   186                 flat_keys[new_base] = None
>  187                 flatten(new_base, depth=new_depth)
   188 
   189         for key in self.keys():
  locals: 
     base = 'form_var_date_selectionne'
     depth = 8
     flat_keys = {'form': <wcs.variables.LazyFormData object at 0x7fa796899630>, ...}
     flatten = <function CompatibilityNamesDict.get_flat_keys.<locals>.flatten at 0x7fa7968ed488>
     item = <wcs.variables.LazyFieldVarStructured object at 0x7fa795f66630>
     new_base = 'form_var_date_selectionne_live'
     new_depth = 7
     self = {'form': <wcs.variables.LazyFormData object at 0x7fa796899630>, 'attachments': <wcs.workflows.AttachmentsSubstitutionProxy object at 0x7fa795fa9278>}
     sub_key = 'live'
     sub_keys = ['raw', 'structured', 'live', 'id', 'text', 'typevent']

  File "/usr/lib/python3/dist-packages/wcs/qommon/substitution.py", line 187, in flatten
   185                 new_base = '%s_%s' % (base, sub_key)
   186                 flat_keys[new_base] = None
>  187                 flatten(new_base, depth=new_depth)
   188 
   189         for key in self.keys():

  locals: 
     base = 'form_var'
     depth = 9
     flat_keys = {'form': <wcs.variables.LazyFormData object at 0x7fa796899630>, ...}
     flatten = <function CompatibilityNamesDict.get_flat_keys.<locals>.flatten at 0x7fa7968ed488>
     item = <wcs.variables.LazyFormDataVar object at 0x7fa795fc77b8>
     new_base = 'form_var_date_selectionne'
     new_depth = 8
     self = {'form': <wcs.variables.LazyFormData object at 0x7fa796899630>, 'attachments': <wcs.workflows.AttachmentsSubstitutionProxy object at 0x7fa795fa9278>}
     sub_key = 'date_selectionne'
     sub_keys = dict_keys(['nom', 'code', 'courriel', 'date_selectionne', 'plaque', 'email_invite', 'autorisation', 'date_selectionne_date'])

...

Fichiers

Révisions associées

Révision 3ca2d568 (diff)
Ajouté par Frédéric Péters il y a presque 4 ans

misc: don't advertise live variables if card is missing (#45296)

Historique

#2

Mis à jour par Frédéric Péters il y a presque 4 ans

  • Assigné à mis à Frédéric Péters
#4

Mis à jour par Frédéric Péters il y a presque 4 ans

#5

Mis à jour par Thomas Noël il y a presque 4 ans

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

Mis à jour par Frédéric Péters il y a presque 4 ans

  • Statut changé de Solution validée à Résolu (à déployer)
commit 3ca2d5684083c1bb7c0dee9e9eda732a1c46fa5a
Author: Frédéric Péters <fpeters@entrouvert.com>
Date:   Mon Jul 20 17:06:30 2020 +0200

    misc: don't advertise _live_ variables if card is missing (#45296)
#7

Mis à jour par Frédéric Péters il y a presque 4 ans

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

Formats disponibles : Atom PDF