mirror of
https://github.com/ansible/awx.git
synced 2026-04-05 01:59:25 -02:30
Fix all instances of can not
This commit is contained in:
@@ -1095,7 +1095,7 @@ class ProjectUpdateDetail(RetrieveDestroyAPIView):
|
||||
def destroy(self, request, *args, **kwargs):
|
||||
obj = self.get_object()
|
||||
if obj.unified_job_nodes.filter(workflow_job__status__in=ACTIVE_STATES).exists():
|
||||
raise PermissionDenied(detail=_('Can not delete job resource when associated workflow job is running.'))
|
||||
raise PermissionDenied(detail=_('Cannot delete job resource when associated workflow job is running.'))
|
||||
return super(ProjectUpdateDetail, self).destroy(request, *args, **kwargs)
|
||||
|
||||
class ProjectUpdateCancel(RetrieveAPIView):
|
||||
@@ -2179,7 +2179,7 @@ class InventoryUpdateDetail(RetrieveDestroyAPIView):
|
||||
def destroy(self, request, *args, **kwargs):
|
||||
obj = self.get_object()
|
||||
if obj.unified_job_nodes.filter(workflow_job__status__in=ACTIVE_STATES).exists():
|
||||
raise PermissionDenied(detail=_('Can not delete job resource when associated workflow job is running.'))
|
||||
raise PermissionDenied(detail=_('Cannot delete job resource when associated workflow job is running.'))
|
||||
return super(InventoryUpdateDetail, self).destroy(request, *args, **kwargs)
|
||||
|
||||
class InventoryUpdateCancel(RetrieveAPIView):
|
||||
@@ -2991,7 +2991,7 @@ class JobDetail(RetrieveUpdateDestroyAPIView):
|
||||
def destroy(self, request, *args, **kwargs):
|
||||
obj = self.get_object()
|
||||
if obj.unified_job_nodes.filter(workflow_job__status__in=ACTIVE_STATES).exists():
|
||||
raise PermissionDenied(detail=_('Can not delete job resource when associated workflow job is running.'))
|
||||
raise PermissionDenied(detail=_('Cannot delete job resource when associated workflow job is running.'))
|
||||
return super(JobDetail, self).destroy(request, *args, **kwargs)
|
||||
|
||||
class JobLabelList(SubListAPIView):
|
||||
|
||||
Reference in New Issue
Block a user