user_groups: Pass list of user ids to bulk_add_members_to_user_group.

We pass list of user ids instead of user profile objects to
bulk_add_members_to_user_group. We still need to call user_id_to_users
in the views function instead of directly passing the ids to
bulk_add_members_to_user_group to make sure we check whether all
ids are valid or not.
This commit is contained in:
Sahil Batra
2022-03-12 14:05:59 +05:30
committed by Tim Abbott
parent b48b98f1d9
commit 303fca2ce7
3 changed files with 7 additions and 7 deletions

View File

@@ -126,7 +126,8 @@ def add_members_to_group_backend(
)
)
bulk_add_members_to_user_group(user_group, user_profiles)
user_profile_ids = [user.id for user in user_profiles]
bulk_add_members_to_user_group(user_group, user_profile_ids)
return json_success(request)