mirror of
https://github.com/ansible/awx.git
synced 2026-05-20 15:27:47 -02:30
Rename type in wfjt 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