workflows: do not execute add/remove roles actions if uncompleted
This commit is contained in:
parent
617f993cf0
commit
65a60554c1
|
@ -43,6 +43,8 @@ class AddRoleWorkflowStatusItem(WorkflowStatusItem):
|
|||
include_id=include_id)
|
||||
|
||||
def perform(self, formdata):
|
||||
if not self.role_id:
|
||||
return
|
||||
if not formdata.user_id:
|
||||
# we can't work on anonymous or user_hash'ed forms
|
||||
return
|
||||
|
@ -76,6 +78,8 @@ class RemoveRoleWorkflowStatusItem(WorkflowStatusItem):
|
|||
options=[(None, '----')] + get_user_roles())
|
||||
|
||||
def perform(self, formdata):
|
||||
if not self.role_id:
|
||||
return
|
||||
if not formdata.user_id:
|
||||
# we can't work on anonymous or user_hash'ed forms
|
||||
return
|
||||
|
|
Loading…
Reference in New Issue