Project

General

Profile

Bug #95630

autour des blocs de champs dynamiques, (AttributeError: 'LazyFormDef' object has no attribute '_formdata')

Added by Sentry Io 23 days ago. Updated 22 days ago.

Status:
Solution déployée
Priority:
Normal
Target version:
-
Start date:
19 September 2024
Due date:
% Done:

0%

Estimated time:
Patch proposed:
No
Planning:
No

Description

C'est intéressant ça révèle que dans le contexte 'form' est LazyFormDef, pas LazyFormData, je ne sais pas quelles circonstances amènent à ça (on est sur un POST, je comptais qu'il y ait déjà un transient_formdata).

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

AttributeError: 'LazyFormDef' object has no attribute '_formdata'
(14 additional frame(s) were not displayed)
...
  File "wcs/qommon/form.py", line 380, in add
    QuixoteForm.add(self, widget_class, name, *args, **kwargs)
  File "quixote/form/form.py", line 235, in add
    widget = widget_class(name, *args, **kwargs)
  File "wcs/blocks.py", line 545, in __init__
    super().__init__(
  File "wcs/qommon/form.py", line 2172, in __init__
    self.add_element()
  File "wcs/blocks.py", line 575, in add_element
    ._formdata.data.get(self.field.id)

Associated revisions

Revision 9e1bedd5 (diff)
Added by Frédéric Péters 22 days ago

misc: avoid error when adding a block line and there's no formdata yet (#95630)

History

#1

Updated by Frédéric Péters 23 days ago

  • Project changed from Suivi des traces to w.c.s.
  • Assignee set to Frédéric Péters
#2

Updated by Robot Gitea 22 days ago

  • Status changed from Nouveau to En cours

Frédéric Péters (fpeters) a ouvert une pull request sur Gitea concernant cette demande :

#3

Updated by Robot Gitea 22 days ago

  • Status changed from En cours to Solution proposée
#4

Updated by Robot Gitea 22 days ago

  • Status changed from Solution proposée to Solution validée

Lauréline Guérin (lguerin) a approuvé une pull request sur Gitea concernant cette demande :

#5

Updated by Robot Gitea 22 days ago

  • Status changed from Solution validée to Résolu (à déployer)

Frédéric Péters (fpeters) a mergé une pull request sur Gitea concernant cette demande :

#6

Updated by Transition automatique 22 days ago

  • Status changed from Résolu (à déployer) to Solution déployée

Also available in: Atom PDF