summaryrefslogtreecommitdiffstats
path: root/awxkit
diff options
context:
space:
mode:
authorArtsiom Musin <artyom.musin@gmail.com>2023-05-26 15:30:58 +0200
committerJeff Bradberry <jeff.bradberry@gmail.com>2024-06-10 20:54:10 +0200
commit451f20ce0fc7c32939c568dcdb7aadbda873ea4a (patch)
treed0b297bf3038dd0e65e06c77f3b5188fe9caa43b /awxkit
parentPeriodically sync from share resource provider (#15264) (diff)
downloadawx-451f20ce0fc7c32939c568dcdb7aadbda873ea4a.tar.xz
awx-451f20ce0fc7c32939c568dcdb7aadbda873ea4a.zip
Use patch to update users in awx cli
Diffstat (limited to 'awxkit')
-rw-r--r--awxkit/awxkit/api/pages/api.py5
1 files changed, 4 insertions, 1 deletions
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)