From 271938c5fc3585b738f531ffec88049e1bc964d2 Mon Sep 17 00:00:00 2001 From: mtward Date: Tue, 23 Aug 2022 15:06:11 -0400 Subject: [PATCH] Update group.py --- awx_collection/plugins/modules/group.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx_collection/plugins/modules/group.py b/awx_collection/plugins/modules/group.py index 91b22f56ad..973fb7744d 100644 --- a/awx_collection/plugins/modules/group.py +++ b/awx_collection/plugins/modules/group.py @@ -170,7 +170,7 @@ def main(): id_list.append(sub_obj['id']) # Preserve existing objects if (preserve_existing_hosts and relationship == 'hosts') or (preserve_existing_children and relationship == 'children'): - preserve_existing_check = module.get_endpoint(group['related'][relationship]) + preserve_existing_check = module.get_all_endpoint(group['related'][relationship]) for sub_obj in preserve_existing_check['json']['results']: id_list.append(sub_obj['id']) if id_list: