mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -03:30
i18n support added.
This commit is contained in:
parent
62e0291f86
commit
ba1dedf2c3
@ -1091,7 +1091,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=_('Can not delete job resource when associated workflow job is running.'))
|
||||
return super(ProjectUpdateDetail, self).destroy(request, *args, **kwargs)
|
||||
|
||||
class ProjectUpdateCancel(RetrieveAPIView):
|
||||
@ -2176,7 +2176,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=_('Can not delete job resource when associated workflow job is running.'))
|
||||
return super(InventoryUpdateDetail, self).destroy(request, *args, **kwargs)
|
||||
|
||||
class InventoryUpdateCancel(RetrieveAPIView):
|
||||
@ -2885,7 +2885,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=_('Can not delete job resource when associated workflow job is running.'))
|
||||
return super(JobDetail, self).destroy(request, *args, **kwargs)
|
||||
|
||||
class JobLabelList(SubListAPIView):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user