From 451f20ce0fc7c32939c568dcdb7aadbda873ea4a Mon Sep 17 00:00:00 2001 From: Artsiom Musin Date: Fri, 26 May 2023 15:30:58 +0200 Subject: Use patch to update users in awx cli --- awxkit/awxkit/api/pages/api.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'awxkit') diff --git a/awxkit/awxkit/api/pages/api.py b/awxkit/awxkit/api/pages/api.py index 13f82e3a06..2283f10c96 100644 --- a/awxkit/awxkit/api/pages/api.py +++ b/awxkit/awxkit/api/pages/api.py @@ -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) -- cgit v1.2.3