mirror of
https://github.com/ansible/awx.git
synced 2026-02-23 22:16:00 -03:30
Implement AC-1224, include the id of the new inventory or project update
when launching
This commit is contained in:
@@ -502,7 +502,7 @@ class ProjectUpdateView(GenericAPIView):
|
|||||||
return Response({}, status=status.HTTP_400_BAD_REQUEST)
|
return Response({}, status=status.HTTP_400_BAD_REQUEST)
|
||||||
else:
|
else:
|
||||||
headers = {'Location': project_update.get_absolute_url()}
|
headers = {'Location': project_update.get_absolute_url()}
|
||||||
return Response(status=status.HTTP_202_ACCEPTED, headers=headers)
|
return Response(dict(project_update=project_update.id), status=status.HTTP_202_ACCEPTED, headers=headers)
|
||||||
else:
|
else:
|
||||||
return self.http_method_not_allowed(request, *args, **kwargs)
|
return self.http_method_not_allowed(request, *args, **kwargs)
|
||||||
|
|
||||||
@@ -1066,7 +1066,7 @@ class InventorySourceUpdateView(GenericAPIView):
|
|||||||
return Response({}, status=status.HTTP_400_BAD_REQUEST)
|
return Response({}, status=status.HTTP_400_BAD_REQUEST)
|
||||||
else:
|
else:
|
||||||
headers = {'Location': inventory_update.get_absolute_url()}
|
headers = {'Location': inventory_update.get_absolute_url()}
|
||||||
return Response(status=status.HTTP_202_ACCEPTED, headers=headers)
|
return Response(dict(inventory_update=inventory_update.id), status=status.HTTP_202_ACCEPTED, headers=headers)
|
||||||
else:
|
else:
|
||||||
return self.http_method_not_allowed(request, *args, **kwargs)
|
return self.http_method_not_allowed(request, *args, **kwargs)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user