mirror of
https://github.com/ansible/awx.git
synced 2026-05-15 21:37:42 -02:30
Remove management job schedule count restriction
This commit is contained in:
@@ -2092,12 +2092,6 @@ class SystemJobTemplateSchedulesList(SubListCreateAttachDetachAPIView):
|
|||||||
relationship = 'schedules'
|
relationship = 'schedules'
|
||||||
parent_key = 'unified_job_template'
|
parent_key = 'unified_job_template'
|
||||||
|
|
||||||
def post(self, request, *args, **kwargs):
|
|
||||||
system_job = self.get_parent_object()
|
|
||||||
if system_job.schedules.filter(active=True).count() > 0:
|
|
||||||
return Response({"error": "Multiple schedules for Systems Jobs is not allowed"}, status=status.HTTP_400_BAD_REQUEST)
|
|
||||||
return super(SystemJobTemplateSchedulesList, self).post(request, *args, **kwargs)
|
|
||||||
|
|
||||||
class SystemJobTemplateJobsList(SubListAPIView):
|
class SystemJobTemplateJobsList(SubListAPIView):
|
||||||
|
|
||||||
model = SystemJob
|
model = SystemJob
|
||||||
|
|||||||
Reference in New Issue
Block a user