1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-02 01:21:21 +03:00

Implement AC-1224, include the id of the new inventory or project update

when launching
This commit is contained in:
Matthew Jones 2014-04-25 12:57:52 -04:00
parent 68eb8a67bc
commit f788adfbca

View File

@ -502,7 +502,7 @@ class ProjectUpdateView(GenericAPIView):
return Response({}, status=status.HTTP_400_BAD_REQUEST)
else:
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:
return self.http_method_not_allowed(request, *args, **kwargs)
@ -1066,7 +1066,7 @@ class InventorySourceUpdateView(GenericAPIView):
return Response({}, status=status.HTTP_400_BAD_REQUEST)
else:
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:
return self.http_method_not_allowed(request, *args, **kwargs)