user-groups: Fix function argument bug; pass group.

In remove_members_from_group_backend, we are passing user group to
remove_members_from_user_group. In remove_members_from_user_group,
expect user_group_id.
This commit is contained in:
Umair Khan 2017-11-14 12:35:28 +05:00 committed by Tim Abbott
parent 66179ea295
commit 31efe951b7
1 changed files with 3 additions and 3 deletions

View File

@ -4323,8 +4323,8 @@ def bulk_add_members_to_user_group(user_group, user_profiles):
for user_profile in user_profiles]
UserGroupMembership.objects.bulk_create(memberships)
def remove_members_from_user_group(user_group_id, user_profiles):
# type: (int, List[UserProfile]) -> None
def remove_members_from_user_group(user_group, user_profiles):
# type: (UserGroup, List[UserProfile]) -> None
UserGroupMembership.objects.filter(
user_group_id=user_group_id,
user_group_id=user_group.id,
user_profile__in=user_profiles).delete()