Bug #13870
panne sur liste à choix multiples : toujours à None
Start date:
04 November 2016
Due date:
% Done:
0%
Estimated time:
Patch proposed:
Yes
Planning:
Description
Un formulaire avec un champ liste à choix multiple, avec un nom de variable "xxx" : le form_var_xxx est à None même si un choix est coché.
Files
Related issues
Associated revisions
History
Updated by Thomas Noël almost 7 years ago
diff --git a/wcs/qommon/form.py b/wcs/qommon/form.py index 6722777..3f529e0 100644 --- a/wcs/qommon/form.py +++ b/wcs/qommon/form.py @@ -1136,7 +1136,7 @@ class CheckboxesWidget(CompositeWidget): for i, option in enumerate(options): if len(option) == 2: key, title = option[:2] - key = str(i) else: _, title, key = option[:3]
... mais je ne comprends pas encore bien #13581
Updated by Thomas Noël almost 7 years ago
peut-être plutôt :
diff --git a/wcs/qommon/form.py b/wcs/qommon/form.py index 6722777..e1b2579 100644 --- a/wcs/qommon/form.py +++ b/wcs/qommon/form.py @@ -1136,12 +1136,12 @@ class CheckboxesWidget(CompositeWidget): for i, option in enumerate(options): if len(option) == 2: key, title = option[:2] - key = str(i) + name = 'element%d' % i else: _, title, key = option[:3] + name = 'element%s' % str(key) key = str(key) - name = 'element%s' % key element_kwargs = kwargs.copy() if self.options_with_attributes and option[-1].get('disabled'):
mais encore une fois, je ne mesure pas ce que je fais là.
Updated by Thomas Noël almost 7 years ago
- Related to Bug #13581: champ cases à cocher avec des libellés contenant des guillemets added
Updated by Thomas Noël almost 7 years ago
- Subject changed from liste à choix multiple => form_var_xxx à None to panne sur liste à choix multiples : toujours à None
- Priority changed from Normal to Immediat
Je pose la priorité à "immédiat" car c'est un bogue présent en prod.
Updated by Thomas Noël almost 7 years ago
- File 0001-forms-don-t-modify-normal-keys-in-checkboxes-widget-.patch 0001-forms-don-t-modify-normal-keys-in-checkboxes-widget-.patch added
- Status changed from Nouveau to En cours
- Assignee set to Thomas Noël
- Patch proposed changed from No to Yes
(bien sûr, le test foire dans le patch).
Updated by Thomas Noël almost 7 years ago
- Private changed from No to Yes
Devant l'urgence, en essayant d'avoir un peu confiance en moi, j'ai posé ce patch en recette et en prod.
Updated by Thomas Noël almost 7 years ago
- Status changed from En cours to Résolu (à déployer)
commit 3623c0fb4eb1e8c3e21bbf71149f8f1342dd7da9 Author: Thomas NOEL <tnoel@entrouvert.com> Date: Fri Nov 4 15:24:50 2016 +0100 forms: don't modify "normal" keys in checkboxes widget (#13870)
forms: don't modify "normal" keys in checkboxes widget (#13870)