remove reviewers option now removes all entities associated with the user instead of just the provided user id
@@ -353,14 +353,17 @@ def assign(client, paper_number, conference,
Also updates the list of unassigned individual groups.
'''
- if user in parent_group.members:
- client.remove_members_from_group(parent_group, user)
- print "{:40s} xxx {}".format(user, parent_group.id)
+ user_groups = [g.id for g in client.get_groups(member=user)]
- assigned_individual_groups = [a for a in individual_groups if user in a.members]
+ for user_entity in user_groups:
+ if user_entity in parent_group.members:
+ client.remove_members_from_group(parent_group, user_entity)
+ print "{:40s} xxx {}".format(user_entity, parent_group.id)
+
+ assigned_individual_groups = [a for a in individual_groups if user_entity in a.members]
for individual_group in assigned_individual_groups:
- print "{:40s} xxx {}".format(user, individual_group.id)
- client.remove_members_from_group(individual_group, user)
+ print "{:40s} xxx {}".format(user_entity, individual_group.id)
+ client.remove_members_from_group(individual_group, user_entity)
unassigned_individual_groups.append(individual_group)
unassigned_individual_groups = sorted(unassigned_individual_groups, key=lambda x: x.id)
