Bug #70508
en mode édition, edited_data non renseigné sur un live (AttributeError: 'FormBackofficeEditPage' object has no attribute 'edited_data')
Start date:
20 October 2022
Due date:
% Done:
0%
Estimated time:
Patch proposed:
Yes
Planning:
No
Description
https://sentry.entrouvert.org/entrouvert/publik/issues/96107/
AttributeError: 'FormBackofficeEditPage' object has no attribute 'edited_data' (10 additional frame(s) were not displayed) ... File "quixote/directory.py", line 92, in _q_traverse return obj() File "wcs/backoffice/management.py", line 2932, in live return FormBackofficeEditPage(self.formdef.url_name).live() File "wcs/forms/root.py", line 1566, in live formdata = self.get_transient_formdata() File "wcs/backoffice/submission.py", line 180, in get_transient_formdata formdata = super().get_transient_formdata(magictoken=magictoken) File "wcs/forms/root.py", line 850, in get_transient_formdata formdata.user = self.edited_data.user
Files
Associated revisions
History
Updated by Lauréline Guérin 3 months ago
- Project changed from Suivi des traces to w.c.s.
- Subject changed from AttributeError: 'FormBackofficeEditPage' object has no attribute 'edited_data' to en mode édition, edited_data non renseigné sur un live (AttributeError: 'FormBackofficeEditPage' object has no attribute 'edited_data')
Des changements dans #68379, qui pose un self.edit_mode = True
dans FormBackofficeEditPage.
Mais visiblement on n'entre pas dans le bloc
if formdata.data.get('edited_formdata_id'): # during editing (edited_formdata_id is set when starting edition, # when there's no magictoken yet) self.edited_data = self.formdef.data_class().get(formdata.data.get('edited_formdata_id'))
self.edited_data
n'est pas setté
Updated by Frédéric Péters 3 months ago
- Status changed from Nouveau to En cours
- Assignee set to Frédéric Péters
Updated by Frédéric Péters 29 days ago
- File 0001-misc-raise-400-on-missing-edited-data-70508.patch 0001-misc-raise-400-on-missing-edited-data-70508.patch added
- Status changed from En cours to Solution proposée
- Patch proposed changed from No to Yes
À défaut de piste, et comme c'est juste arrivé une fois, juste un patch pour attraper la situation et renvoyer une 400.
Updated by Lauréline Guérin 29 days ago
- Status changed from Solution proposée to Solution validée
Updated by Frédéric Péters 29 days ago
- Status changed from Solution validée to Résolu (à déployer)
commit 009ba46fa664fcc5eed8dbdf2471bf442effd56f Author: Frédéric Péters <fpeters@entrouvert.com> Date: Mon Jan 2 09:29:33 2023 +0100 misc: raise 400 on missing edited data (#70508)
Updated by Transition automatique 29 days ago
- Status changed from Résolu (à déployer) to Solution déployée
misc: raise 400 on missing edited data (#70508)