Projet

Général

Profil

Bug #40320

Import de formulaire: AttributeError

Ajouté par Lauréline Guérin il y a environ 4 ans. Mis à jour il y a environ 4 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Version cible:
-
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

Révision 1f3af367 (diff)
Ajouté par Frédéric Péters il y a environ 4 ans

fields: use xml_node_text() for safe access to prefill nodes (#40320)

Historique

#1

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

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

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

En reproduisant en tripotant malhonnêtement l'XML généré.

#3

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

#4

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)
#5

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

Formats disponibles : Atom PDF