Bug #40009
get_session() hors requête
Début:
19 février 2020
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Oui
Planning:
Non
Description
Exception: type = '<class 'AttributeError'>', value = ''NoneType' object has no attribute 'session'' Stack trace (most recent call first): File "/usr/lib/python3/dist-packages/wcs/monkeypatch.py", line 84, in get_session 82 83 def get_session(): > 84 return _thread_local.publisher.get_request().session 85 86 File "/usr/lib/python3/dist-packages/wcs/formdata.py", line 894, in is_submitter 892 if self.user_id and user and str(self.user_id) == str(user.id): 893 return True > 894 if get_session() and get_session().is_anonymous_submitter(self): 895 return True 896 return False
Fichiers
Révisions associées
Historique
Mis à jour par Frédéric Péters il y a environ 4 ans
- Fichier 0001-misc-don-t-check-for-session-if-there-s-no-request-4.patch 0001-misc-don-t-check-for-session-if-there-s-no-request-4.patch ajouté
- Statut changé de Nouveau à Solution proposée
- Patch proposed changé de Non à Oui
Mis à jour par Thomas Noël il y a environ 4 ans
- Statut changé de Solution proposée à Solution validée
Etonnement je crois n'avoir jamais croisé cette trace auparavant.
Mis à jour par Frédéric Péters il y a environ 4 ans
- Statut changé de Solution validée à Résolu (à déployer)
Oui ça m'a laissé curieux aussi.
commit 113df1dad2b9601d187d696e53105cfabac6c159 Author: Frédéric Péters <fpeters@entrouvert.com> Date: Wed Feb 19 13:44:04 2020 +0100 misc: don't check for session if there's no request (#40009)
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: don't check for session if there's no request (#40009)