Use patch to update users in awx cli

This commit is contained in:
Artsiom Musin 2023-05-26 15:30:58 +02:00 committed by Jeff Bradberry
parent c1dc0c7b86
commit 451f20ce0f

View File

@ -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']:
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
except (exc.Common, AssertionError) as e:
identifier = asset.get("name", None) or asset.get("username", None) or asset.get("hostname", None)