Project

General

Profile

Bug #17197

action globale autorisée au demandeur : crash sur le frontoffice

Added by Thomas Noël almost 3 years ago.

Status:
Nouveau
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
27 Jun 2017
Due date:
% Done:

0%

Patch proposed:
No
Planning:
No

Description

Workflow avec une action globale dont le déclenchement est autorisé au demandeur : crash sur le frontoffice

Exception:
  type = '<type 'exceptions.Exception'>', value = '_submitter is not a valid role'

Stack trace (most recent call first):
  File "/usr/lib/python2.7/dist-packages/wcs/workflows.py", line 1733, in get_role_translation
  1731 def get_role_translation(formdata, role_name):
  1732     if role_name == '_submitter':
> 1733         raise Exception('_submitter is not a valid role')
  1734     elif str(role_name).startswith('_'):
  1735         role_id = None

  locals:
     formdata = <Signaler-Un-Incident-De-Voirie ' Signaler un incident de voirie - n\xc2\xb0251-1' id:1>
     role_name = '_submitter'

  File "/usr/lib/python2.7/dist-packages/wcs/workflows.py", line 405, in get_global_actions_for_user
   403                 if isinstance(trigger, WorkflowGlobalActionManualTrigger):
   404                     roles = [get_role_translation(formdata, x)
>  405                              for x in (trigger.roles or [])]
   406                     if set(roles).intersection(user.roles or []):
   407                         actions.append(action)

  locals:
     formdata = <Signaler-Un-Incident-De-Voirie ' Signaler un incident de voirie - n\xc2\xb0251-1' id:1>
     actions = []
     trigger = <wcs.workflows.WorkflowGlobalActionManualTrigger object at 0x7f20c0ba2690>
     user = <SqlUser 'Victor Claudet' id:13>
     action = <wcs.workflows.WorkflowGlobalAction object at 0x7f20e5e67810>
     x = '_submitter'
     self = <Workflow 'Signalements voirie' id:38>

...

Also available in: Atom PDF