mirror of
https://github.com/ansible/awx.git
synced 2026-03-18 01:17:35 -02:30
Changing how get_one returns
This commit is contained in:
@@ -380,7 +380,7 @@ def main():
|
||||
organization_id = module.resolve_name_to_id('organizations', organization)
|
||||
|
||||
# Attempt to look up an existing item based on the provided data
|
||||
existing_item, name = module.get_one('notification_templates', name_or_id=name, **{
|
||||
existing_item = module.get_one('notification_templates', name_or_id=name, **{
|
||||
'data': {
|
||||
'organization': organization_id,
|
||||
}
|
||||
@@ -403,7 +403,7 @@ def main():
|
||||
new_fields = {}
|
||||
if final_notification_configuration:
|
||||
new_fields['notification_configuration'] = final_notification_configuration
|
||||
new_fields['name'] = new_name if new_name else name
|
||||
new_fields['name'] = new_name if new_name else (module.get_item_name(existing_item) if existing_item else name)
|
||||
if description is not None:
|
||||
new_fields['description'] = description
|
||||
if organization is not None:
|
||||
|
||||
Reference in New Issue
Block a user