mirror of
https://github.com/ansible/awx.git
synced 2026-01-20 22:18:01 -03:30
accept inventory_id in workflow launch requests
This commit is contained in:
parent
38f43c147a
commit
f8453ffe68
@ -3113,6 +3113,9 @@ class WorkflowJobTemplateLaunch(WorkflowsEnforcementMixin, RetrieveAPIView):
|
||||
def post(self, request, *args, **kwargs):
|
||||
obj = self.get_object()
|
||||
|
||||
if 'inventory_id' in request.data:
|
||||
request.data['inventory'] = request.data['inventory_id']
|
||||
|
||||
serializer = self.serializer_class(instance=obj, data=request.data)
|
||||
if not serializer.is_valid():
|
||||
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user