Bug #9461
trace sur document_type = None
Début:
31 décembre 2015
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Oui
Planning:
Description
Exception: type = '<type 'exceptions.AttributeError'>', value = ''NoneType' object has no attribute 'get'' Stack trace (most recent call first): File "/usr/lib/python2.7/dist-packages/wcs/fields.py", line 699, in fill_admin_form 697 # the current value not to be hidden, we must reset it with the corresponding 698 # value from settings based on the 'id' > 699 document_type_id = self.document_type.get('id') 700 if document_type_id in document_types \ 701 and self.document_type != document_types[document_type_id]: locals: self = <wcs.fields.FileField object at 0x4c30750> cur_dt = None form = <qommon.form.Form object at 0x4c30c10> document_types = {'_image': {'mimetypes': ['image/*'], 'id': '_image', 'label': 'Fichiers image'}, '_video': {'mimetypes': ['video/*'], 'id ': '_video', 'label': 'Fichiers vid\xc3\xa9o'}, '_audio': {'mimetypes': ['audio/*'], 'id': '_audio', 'label': 'Fichiers son'}}
Fichiers
Révisions associées
Historique
Mis à jour par Frédéric Péters il y a plus de 8 ans
- Fichier 0001-fields-make-sure-document_type-is-always-a-dictionar.patch 0001-fields-make-sure-document_type-is-always-a-dictionar.patch ajouté
- Statut changé de Nouveau à En cours
- Patch proposed changé de Non à Oui
Sur le fond je n'ai pas cherché mais j'imagine bien un nouveau coup d'import/export qui laisse un None là où ce n'est pas attendu. (vu que le init met l'attribut à {}).
Mis à jour par Frédéric Péters il y a plus de 8 ans
- Statut changé de En cours à Résolu (à déployer)
commit f3f210fcf6d909ef5a0aab6cc9d9afe14905795d Author: Frédéric Péters <fpeters@entrouvert.com> Date: Thu Dec 31 15:56:30 2015 +0100 fields: make sure document_type is always a dictionary (#9461)
fields: make sure document_type is always a dictionary (#9461)