mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 23:51:09 +03:00
hack around mutability problem for v1 launch
This commit is contained in:
parent
308acc4bc9
commit
3d65dc48dc
@ -2775,7 +2775,9 @@ class JobTemplateLaunch(RetrieveAPIView, GenericAPIView):
|
|||||||
if fd not in request.data and id_fd in request.data:
|
if fd not in request.data and id_fd in request.data:
|
||||||
request.data[fd] = request.data[id_fd]
|
request.data[fd] = request.data[id_fd]
|
||||||
|
|
||||||
if get_request_version(self.request) == 1: # TODO: remove in 3.3
|
if get_request_version(self.request) == 1 and 'extra_credentials' in request.data: # TODO: remove in 3.3
|
||||||
|
if hasattr(request.data, '_mutable') and not request.data._mutable:
|
||||||
|
request.data._mutable = True
|
||||||
extra_creds = request.data.pop('extra_credentials', None)
|
extra_creds = request.data.pop('extra_credentials', None)
|
||||||
if extra_creds is not None:
|
if extra_creds is not None:
|
||||||
ignored_fields['extra_credentials'] = extra_creds
|
ignored_fields['extra_credentials'] = extra_creds
|
||||||
|
Loading…
Reference in New Issue
Block a user