Projet

Général

Profil

Bug #23239

Action d'affectation de rôle hors requête

Ajouté par Frédéric Péters il y a environ 6 ans. Mis à jour il y a plus de 5 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Version cible:
-
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

Révision 38dbc032 (diff)
Ajouté par Frédéric Péters il y a environ 6 ans

workflows: make roles action usable out of requests (#23239)

Révision 39bf9f64 (diff)
Ajouté par Thomas Noël il y a environ 6 ans

workflows: make AddRole action usable out of requests (#23239)

Révision eb9d1052 (diff)
Ajouté par Frédéric Péters il y a environ 6 ans

workflows: do not use after jobs when there's no http response (#23239)

Historique

#1

Mis à jour par Frédéric Péters il y a environ 6 ans

#2

Mis à jour par Thomas Noël il y a environ 6 ans

Ack

#4

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:

#5

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)
#6

Mis à jour par Thomas Noël il y a environ 6 ans

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).

#7

Mis à jour par Thomas Noël il y a environ 6 ans

(assez sûr de mon fait, hotfix posé sur la recette)

#8

Mis à jour par Frédéric Péters il y a environ 6 ans

Fatigue; merci :/

#9

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)

#10

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.

#13

Mis à jour par Thomas Noël il y a environ 6 ans

Ack, bien vu.

#14

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)
#15

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

Formats disponibles : Atom PDF