Skip to content

Commit

Permalink
refactor: update method for getting unique user_ids
Browse files Browse the repository at this point in the history
Signed-off-by: Youngjin Jo <[email protected]>
  • Loading branch information
yjinjo committed Oct 7, 2024
1 parent 751436e commit c281966
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/spaceone/identity/manager/workspace_group_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c281966

Please sign in to comment.