Fixed add-assignments to correct readership of AnonReviewer groups
@@ -623,7 +623,6 @@ def add_assignment(client, paper_number, conference, reviewer,
:arg parent_group_params: optional parameter that overrides the default
:arg individual_group_params: optional parameter that overrides the default
'''
-
result = get_reviewer_groups(client, paper_number, conference, parent_group_params, parent_label, individual_label)
parent_group = result[0]
individual_groups = result[1]
@@ -648,23 +647,37 @@ def add_assignment(client, paper_number, conference, reviewer,
paper_authors = '{}/Paper{}/Authors'.format(conference, paper_number)
# Set the default values for the individual groups
- individual_group_params_default = {
- 'readers': [conference, '{}/Program_Chairs'.format(conference)],
- 'writers': [conference],
- 'signatures': [conference],
- 'signatories': []
- }
- individual_group_params_default.update(individual_group_params)
- individual_group_params = individual_group_params_default
+ default_readers = [conference, '{}/Program_Chairs'.format(conference)]
+ default_writers = [conference]
+ default_signatures = [conference]
+ default_nonreaders = []
+ default_members = []
+ default_signatories = []
+
+ readers = individual_group_params.get('readers', default_readers)[:]
+ readers.append(anonreviewer_id)
+
+ nonreaders = individual_group_params.get('nonreaders', default_nonreaders)[:]
+ nonreaders.append(paper_authors)
+
+ writers = individual_group_params.get('writers', default_writers)[:]
+
+ members = individual_group_params.get('members', default_members)[:]
+ members.append(user)
+
+ signatories = individual_group_params.get('signatories', default_signatories)[:]
+ signatories.append(anonreviewer_id)
+
+ signatures = individual_group_params.get('signatures', default_signatures)[:]
individual_group = openreview.Group(
id = anonreviewer_id,
- **individual_group_params)
-
- individual_group.readers.append(anonreviewer_id)
- individual_group.nonreaders.append(paper_authors)
- individual_group.signatories.append(anonreviewer_id)
- individual_group.members.append(user)
+ readers = readers,
+ nonreaders = nonreaders,
+ writers = writers,
+ members = members,
+ signatories = signatories,
+ signatures = signatures)
print("{:40s} --> {}".format(user, individual_group.id))
return client.post_group(individual_group)
