Bug #23239
Action d'affectation de rôle hors requête
Début:
17 avril 2018
Echéance:
% réalisé:
0%
Temps estimé:
Patch proposed:
Oui
Planning:
Description
Exception: type = '<type 'exceptions.AttributeError'>', value = ''NoneType' object has no attribute 'user'' Stack trace (most recent call first): File "/usr/lib/python2.7/dist-packages/wcs/wf/roles.py", line 90, in perform_local 88 user.roles.append(self.role_id) 89 user.store() > 90 if get_request().user and get_request().user.id == user.id: 91 # if we changed the currently logged in user, we update it with the 92 # changes. locals: formdata = <Premiere-Demande-D-Allocation-Personnalisee-Dautonomie-Apa-A-Domicile-Copie-Travail-En-Cours "Premi\xc3\xa8re demande d'Allocat ion Personnalis\xc3\xa9e d'Autonomie (APA) \xc3\xa0 domicile - n\xc2\xb039-49" id:49> self = <wcs.wf.roles.AddRoleWorkflowStatusItem object at 0x7f6cde9cccd0> user = <SqlUser 'Emmanuelle Berre' id:53> File "/usr/lib/python2.7/dist-packages/wcs/wf/roles.py", line 80, in perform 78 return 79 user = get_publisher().user_class.get(formdata.user_id) > 80 self.perform_local(user, formdata) 81 if user.name_identifiers and is_idp_managing_user_attributes(): 82 self.perform_idp(user, formdata)
Fichiers
Révisions associées
workflows: make AddRole action usable out of requests (#23239)
workflows: do not use after jobs when there's no http response (#23239)
Historique
Mis à jour par Frédéric Péters il y a environ 6 ans
- Fichier 0001-workflows-make-roles-action-usable-out-of-requests-2.patch 0001-workflows-make-roles-action-usable-out-of-requests-2.patch ajouté
- Statut changé de Nouveau à En cours
- Patch proposed changé de Non à Oui
Mis à jour par Thomas Noël il y a environ 6 ans
Posé sur la recette ce hotfix ; à voir si on le pose aussi en prod ?
- if get_request().user and get_request().user.id == user.id: + if get_request() and get_request().user and get_request().user.id == user.id:
Mis à jour par Frédéric Péters il y a environ 6 ans
- Statut changé de En cours à Résolu (à déployer)
Pas vu de trace de la prod.
commit 38dbc032b644dbebe7ab82e29d73029881e09069 Author: Frédéric Péters <fpeters@entrouvert.com> Date: Tue Apr 17 12:52:37 2018 +0200 workflows: make roles action usable out of requests (#23239)
Mis à jour par Thomas Noël il y a environ 6 ans
- Fichier 0001-workflows-make-AddRole-action-usable-out-of-requests.patch 0001-workflows-make-AddRole-action-usable-out-of-requests.patch ajouté
- Statut changé de Résolu (à déployer) à En cours
Arf, même pas vu que ça n'a pas été patché au bon endroit ; on a juste patché la suppression de rôle. Ci-joint pour AddRole (ce ticket, donc).
Mis à jour par Thomas Noël il y a environ 6 ans
(assez sûr de mon fait, hotfix posé sur la recette)
Mis à jour par Thomas Noël il y a environ 6 ans
- Statut changé de En cours à Résolu (à déployer)
commit 39bf9f6433f7bc0fa2b6267483fa916b2713410c Author: Thomas NOEL <tnoel@entrouvert.com> Date: Thu Apr 19 14:51:51 2018 +0200 workflows: make AddRole action usable out of requests (#23239)
Mis à jour par Frédéric Péters il y a environ 6 ans
- Statut changé de Résolu (à déployer) à En cours
Pas encore ça; quand on n'est pas dans le schéma requête/réponse on ne doit pas utiliser d'afterjob.
Mis à jour par Frédéric Péters il y a environ 6 ans
- Fichier 0001-workflows-do-not-use-after-jobs-when-there-s-no-http.patch 0001-workflows-do-not-use-after-jobs-when-there-s-no-http.patch ajouté
À quai.
Mis à jour par Frédéric Péters il y a environ 6 ans
- Statut changé de En cours à Résolu (à déployer)
commit eb9d10524cee71936135e7e8be6339db11b87501 Author: Frédéric Péters <fpeters@entrouvert.com> Date: Thu Apr 19 17:08:29 2018 +0200 workflows: do not use after jobs when there's no http response (#23239)
Mis à jour par Frédéric Péters il y a plus de 5 ans
- Statut changé de Résolu (à déployer) à Solution déployée
workflows: make roles action usable out of requests (#23239)