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:
parent
68eb8a67bc
commit
f788adfbca
@ -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)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user