fixing a failed test.
This commit is contained in:
parent
d85ca1ce51
commit
fa7608053a
|
@ -222,7 +222,7 @@ class WorkflowService(object):
|
|||
nav_item['title'] = nav_item['task'].title # Prefer the task title.
|
||||
|
||||
user_uids = WorkflowService.get_users_assigned_to_task(processor, spiff_task)
|
||||
if g.user.uid not in user_uids:
|
||||
if 'user' not in g or not g.user or g.user.uid not in user_uids:
|
||||
nav_item['state'] = WorkflowService.TASK_STATE_LOCKED
|
||||
|
||||
else:
|
||||
|
@ -255,7 +255,7 @@ class WorkflowService(object):
|
|||
workflow_api.next_task = WorkflowService.spiff_task_to_api_task(next_task, add_docs_and_forms=True)
|
||||
# Update the state of the task to locked if the current user does not own the task.
|
||||
user_uids = WorkflowService.get_users_assigned_to_task(processor, next_task)
|
||||
if g.user.uid not in user_uids:
|
||||
if 'user' not in g or not g.user or g.user.uid not in user_uids:
|
||||
workflow_api.next_task.state = WorkflowService.TASK_STATE_LOCKED
|
||||
return workflow_api
|
||||
|
||||
|
|
Loading…
Reference in New Issue