mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 14:57:39 -02:30
Merge pull request #5084 from fosterseth/fix-4147-schedule500error
Fix 500 error when creating a job schedule Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
@@ -574,7 +574,7 @@ class SubListCreateAPIView(SubListAPIView, ListCreateAPIView):
|
|||||||
status=status.HTTP_400_BAD_REQUEST)
|
status=status.HTTP_400_BAD_REQUEST)
|
||||||
|
|
||||||
# Verify we have permission to add the object as given.
|
# Verify we have permission to add the object as given.
|
||||||
if not request.user.can_access(self.model, 'add', serializer.initial_data):
|
if not request.user.can_access(self.model, 'add', serializer.validated_data):
|
||||||
raise PermissionDenied()
|
raise PermissionDenied()
|
||||||
|
|
||||||
# save the object through the serializer, reload and returned the saved
|
# save the object through the serializer, reload and returned the saved
|
||||||
|
|||||||
Reference in New Issue
Block a user