diff --git a/src/spaceone/identity/manager/workspace_group_manager.py b/src/spaceone/identity/manager/workspace_group_manager.py index 9b22a249..e45db4df 100644 --- a/src/spaceone/identity/manager/workspace_group_manager.py +++ b/src/spaceone/identity/manager/workspace_group_manager.py @@ -139,11 +139,9 @@ def get_unique_user_ids( unique_user_ids = {user["user_id"] for user in users} old_user_ids.extend(list(unique_user_ids)) - new_user_ids = [] - for new_user_info in new_users_info_list: - unique_user_ids = {new_user_info["user_id"]} - new_user_ids.extend(list(unique_user_ids)) - + new_user_ids = list( + {new_user_info["user_id"] for new_user_info in new_users_info_list} + ) return old_user_ids, new_user_ids @staticmethod