mirror of
https://github.com/ansible/awx.git
synced 2026-03-26 05:15:02 -02:30
Changing how get_one returns
This commit is contained in:
@@ -109,7 +109,7 @@ def main():
|
||||
org_id = module.resolve_name_to_id('organizations', organization)
|
||||
|
||||
# Attempt to look up inventory based on the provided name and org ID
|
||||
inventory, name = module.get_one('inventories', name_or_id=name, **{
|
||||
inventory = module.get_one('inventories', name_or_id=name, **{
|
||||
'data': {
|
||||
'organization': org_id
|
||||
}
|
||||
@@ -121,7 +121,7 @@ def main():
|
||||
|
||||
# Create the data that gets sent for create and update
|
||||
inventory_fields = {
|
||||
'name': name,
|
||||
'name': module.get_item_name(inventory) if inventory else name,
|
||||
'organization': org_id,
|
||||
'kind': kind,
|
||||
'host_filter': host_filter,
|
||||
|
||||
Reference in New Issue
Block a user