Skip to content

Commit

Permalink
fix UT: ReviewerForProposalForm has no instance
Browse files Browse the repository at this point in the history
  • Loading branch information
odkhang committed Aug 28, 2024
1 parent 2db6a0a commit f2870a8
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/pretalx/orga/forms/review.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,8 @@ def __init__(self, *args, **kwargs):
)

def save(self, *args, **kwargs):
# No calling 'super().save()' here – it would potentially update a user's code!
instance = self.instance
if "assigned_reviews" in self.changed_data:
new_code = self.cleaned_data.get("code")
if instance.code != new_code:
instance = User.objects.get(code=new_code)
instance.assigned_reviews.set(self.cleaned_data["assigned_reviews"])
for submission in self.submissions:
submission.assigned_reviewers.set(self.cleaned_data[submission.code])


class ProposalForReviewerForm(ReviewAssignmentForm):
Expand Down

0 comments on commit f2870a8

Please sign in to comment.