mirror of
https://github.com/ansible/awx.git
synced 2026-03-17 08:57:33 -02:30
Changing how get_one returns
This commit is contained in:
@@ -134,7 +134,7 @@ def main():
|
||||
# Attempt to look up the related items the user specified (these will fail the module if not found)
|
||||
|
||||
# Attempt to look up an existing item based on the provided data
|
||||
existing_item, username = module.get_one('users', name_or_id=username)
|
||||
existing_item = module.get_one('users', name_or_id=username)
|
||||
|
||||
if state == 'absent':
|
||||
# If the state was absent we can let the module delete it if needed, the module will handle exiting from this
|
||||
@@ -143,7 +143,7 @@ def main():
|
||||
# Create the data that gets sent for create and update
|
||||
new_fields = {}
|
||||
if username:
|
||||
new_fields['username'] = username
|
||||
new_fields['username'] = module.get_item_name(existing_item) if existing_item else name
|
||||
if first_name:
|
||||
new_fields['first_name'] = first_name
|
||||
if last_name:
|
||||
|
||||
Reference in New Issue
Block a user