Skip to content

Commit

Permalink
Use patch to update users in awx cli
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtsiomMusin authored and jbradberry committed Jun 10, 2024
1 parent c1dc0c7 commit 451f20c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion awxkit/awxkit/api/pages/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,10 @@ def _import_list(self, endpoint, assets):
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)
Expand Down

0 comments on commit 451f20c

Please sign in to comment.