mirror of
https://github.com/ansible/awx.git
synced 2026-02-26 07:26:03 -03:30
Merge pull request #4017 from jangsutsr/3976_rename_type_in_wfjt_delete_conflict_message
Rename type in workflow job template delete conflict message
This commit is contained in:
@@ -1554,7 +1554,7 @@ class WorkflowJobTemplateAccess(BaseAccess):
|
|||||||
is_delete_allowed = self.user.is_superuser or self.user in obj.admin_role
|
is_delete_allowed = self.user.is_superuser or self.user in obj.admin_role
|
||||||
if not is_delete_allowed:
|
if not is_delete_allowed:
|
||||||
return False
|
return False
|
||||||
active_jobs = [dict(type="job", id=o.id)
|
active_jobs = [dict(type="workflow_job", id=o.id)
|
||||||
for o in obj.jobs.filter(status__in=ACTIVE_STATES)]
|
for o in obj.jobs.filter(status__in=ACTIVE_STATES)]
|
||||||
if len(active_jobs) > 0:
|
if len(active_jobs) > 0:
|
||||||
raise StateConflict({"conflict": _("Resource is being used by running jobs"),
|
raise StateConflict({"conflict": _("Resource is being used by running jobs"),
|
||||||
|
|||||||
Reference in New Issue
Block a user