mirror of
https://github.com/ansible/awx.git
synced 2026-02-28 00:08:44 -03:30
Fix 500 error on workflow_approvals endpoint
This commit is contained in:
@@ -2809,7 +2809,10 @@ class WorkflowApprovalAccess(BaseAccess):
|
||||
self.user, 'read_role'))
|
||||
|
||||
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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user