Bug #40320
Import de formulaire: AttributeError
Début:
02 mars 2020
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Oui
Planning:
Non
Description
Lors de l'import du formulaire https://demarches-moncompte.cutm-ea-dev-publik.nfrance.com/backoffice/forms/225/ (maj DUI pour toulouse axel) en local, j'ai cette erreur:
Exception: type = '<class 'AttributeError'>', value = ''NoneType' object has no attribute 'text'' Stack trace (most recent call first): File "/home/lguerin/src/wcs/wcs/fields.py", line 332, in prefill_init_with_xml 330 } 331 if self.prefill['type'] and self.prefill['type'] != 'none': > 332 self.prefill['value'] = force_str(node.find('value').text) 333 if xml_node_text(node.find('locked')) == 'True': 334 self.prefill['locked'] = True
Fichiers
Révisions associées
Historique
Mis à jour par Frédéric Péters il y a environ 4 ans
- Fichier 0001-fields-use-xml_node_text-for-safe-access-to-prefill-.patch 0001-fields-use-xml_node_text-for-safe-access-to-prefill-.patch ajouté
- Statut changé de Nouveau à Solution proposée
- Patch proposed changé de Non à Oui
En reproduisant en tripotant malhonnêtement l'XML généré.
Mis à jour par Lauréline Guérin il y a environ 4 ans
- Statut changé de Solution proposée à Solution validée
- Assigné à changé de Frédéric Péters à Benjamin Dauvergne
ok, testé en local
Mis à jour par Frédéric Péters il y a environ 4 ans
- Statut changé de Solution validée à Résolu (à déployer)
commit 1f3af367473840785eac8639687184a968add8ab Author: Frédéric Péters <fpeters@entrouvert.com> Date: Mon Mar 2 11:12:04 2020 +0100 fields: use xml_node_text() for safe access to prefill nodes (#40320)
Mis à jour par Frédéric Péters il y a environ 4 ans
- Statut changé de Résolu (à déployer) à Solution déployée
fields: use xml_node_text() for safe access to prefill nodes (#40320)