Bug #39240
condition à moitié définie en xml
Début:
24 janvier 2020
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Oui
Planning:
Non
Description
donne :
Exception: type = '<type 'exceptions.AttributeError'>', value = ''NoneType' object has no attribute 'encode'' Stack trace (most recent call first): File "/usr/lib/python2.7/dist-packages/wcs/qommon/__init__.py", line 40, in force_str 38 if isinstance(s, str): 39 return s > 40 return s.encode('utf-8') 41 else: 42 force_str = force_text locals: s = None File "/usr/lib/python2.7/dist-packages/wcs/fields.py", line 308, in condition_init_with_xml 306 self.condition = { 307 'type': force_str(node.find('type').text), > 308 'value': force_str(node.find('value').text), 309 } 310 elif node.text: locals: charset = 'utf-8' include_id = True node = <Element 'condition' at 0x7f4a4a8867d0> self = <TitleField None "Dotation d'objet publicitaire">
Fichiers
Révisions associées
Historique
Mis à jour par Frédéric Péters il y a environ 4 ans
- Fichier 0001-misc-use-helper-function-to-get-xml-node-text-39240.patch 0001-misc-use-helper-function-to-get-xml-node-text-39240.patch ajouté
- Statut changé de Nouveau à Solution proposée
- Patch proposed changé de Non à Oui
Ajout d'un xml_node_text(node) qui gère la possibilité que node ou node.text soit None et utilisation semi-extensive de cette nouvelle fonction (en cherchant sur base de quelques patterns).
Mis à jour par Benjamin Dauvergne il y a environ 4 ans
- Statut changé de Solution proposée à Solution validée
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 4f30c216af26bd84e8588204c9eb935c6a6de14e Author: Frédéric Péters <fpeters@entrouvert.com> Date: Fri Jan 24 14:25:43 2020 +0100 misc: use helper function to get xml node text (#39240)
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
misc: use helper function to get xml node text (#39240)