mirror of
https://github.com/ansible/awx.git
synced 2026-03-14 07:27:28 -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)
|
||||
|
||||
# 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()
|
||||
|
||||
# save the object through the serializer, reload and returned the saved
|
||||
|
||||
Reference in New Issue
Block a user