mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 18:07:36 -02:30
Hack to delete orphaned organizations, consolidate get_one methods
minor test update Updating the message if more than one object is found Update test to new message
This commit is contained in:
@@ -129,12 +129,7 @@ def main():
|
||||
|
||||
resource_name = params.get(param)
|
||||
if resource_name:
|
||||
resource = module.get_one_by_name_or_id(module.param_to_endpoint(param), resource_name)
|
||||
if not resource:
|
||||
module.fail_json(
|
||||
msg='Failed to update role, {0} not found in {1}'.format(param, endpoint),
|
||||
changed=False
|
||||
)
|
||||
resource = module.get_exactly_one(module.param_to_endpoint(param), resource_name)
|
||||
resource_data[param] = resource
|
||||
|
||||
# separate actors from resources
|
||||
|
||||
Reference in New Issue
Block a user