Bug #6755
Crash sur utilisateurs qui ont roles = None
Début:
17 mars 2015
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Oui
Planning:
Description
À Lambersart je ne sais comment, deux utilisteurs ont roles = None.
<User 'Caudron Christophe' id:470> <User 'bencherif roger' id:409>
Ce qui amène un crash ici :
Exception: type = '<type 'exceptions.TypeError'>', value = ''NoneType' object is not iterable' Stack trace (most recent call first): File "/usr/lib/python2.7/dist-packages/wcs/forms/root.py", line 159, in check_role 157 self.user and self.user.is_admin): 158 if self.user: > 159 user_roles = set(self.user.roles) 160 else: 161 user_roles = set([])
Fichiers
Révisions associées
Historique
Mis à jour par Frédéric Péters il y a environ 9 ans
- Fichier 0001-misc-do-not-crash-on-users-that-have-None-as-roles-6.patch 0001-misc-do-not-crash-on-users-that-have-None-as-roles-6.patch ajouté
- Statut changé de Nouveau à En cours
- Patch proposed changé de Non à Oui
Patch tapé en prod.
Mis à jour par Frédéric Péters il y a environ 9 ans
- Statut changé de En cours à Résolu (à déployer)
commit 32078370f1b199dd785c7f7d2b01c08385a42e55 Author: Frédéric Péters <fpeters@entrouvert.com> Date: Tue Mar 17 09:36:53 2015 +0100 misc: do not crash on users that have None as roles (#6755)
misc: do not crash on users that have None as roles (#6755)