mirror of
https://github.com/ansible/awx.git
synced 2026-03-09 21:49:27 -02:30
Use patch to update users in awx cli
This commit is contained in:
committed by
Jeff Bradberry
parent
c1dc0c7b86
commit
451f20ce0f
@@ -317,7 +317,10 @@ class ApiV2(base.Base):
|
|||||||
if asset['natural_key']['type'] == 'project' and 'local_path' in post_data and _page['scm_type'] == post_data['scm_type']:
|
if asset['natural_key']['type'] == 'project' and 'local_path' in post_data and _page['scm_type'] == post_data['scm_type']:
|
||||||
del post_data['local_path']
|
del post_data['local_path']
|
||||||
|
|
||||||
_page = _page.put(post_data)
|
if asset['natural_key']['type'] == 'user':
|
||||||
|
_page = _page.patch(**post_data)
|
||||||
|
else:
|
||||||
|
_page = _page.put(post_data)
|
||||||
changed = True
|
changed = True
|
||||||
except (exc.Common, AssertionError) as e:
|
except (exc.Common, AssertionError) as e:
|
||||||
identifier = asset.get("name", None) or asset.get("username", None) or asset.get("hostname", None)
|
identifier = asset.get("name", None) or asset.get("username", None) or asset.get("hostname", None)
|
||||||
|
|||||||
Reference in New Issue
Block a user