mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-03 06:31:49 -05:00
Merge branch 'master' into expunge-zeromq-unstable
This commit is contained in:
@@ -1768,6 +1768,12 @@ class SystemJobTemplateSchedulesList(SubListCreateAPIView):
|
||||
relationship = 'schedules'
|
||||
parent_key = 'unified_job_template'
|
||||
|
||||
def post(self, request, *args, **kwargs):
|
||||
system_job = self.get_parent_object()
|
||||
if system_job.schedules.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):
|
||||
|
||||
model = SystemJob
|
||||
|
||||
Reference in New Issue
Block a user