mirror of
https://github.com/ansible/awx.git
synced 2026-03-27 13:55:04 -02:30
Fix 500 error on workflow_approvals endpoint
This commit is contained in:
@@ -2809,7 +2809,10 @@ class WorkflowApprovalAccess(BaseAccess):
|
|||||||
self.user, 'read_role'))
|
self.user, 'read_role'))
|
||||||
|
|
||||||
def can_approve_or_deny(self, obj):
|
def can_approve_or_deny(self, obj):
|
||||||
if self.user in obj.workflow_job_template.approval_role or self.user.is_superuser:
|
if (
|
||||||
|
(obj.workflow_job_template and self.user in obj.workflow_job_template.approval_role) or
|
||||||
|
self.user.is_superuser
|
||||||
|
):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user