Skip to content

Commit

Permalink
Fix saving of teams in StageGroupForm (#72)
Browse files Browse the repository at this point in the history
Resolves #71.
  • Loading branch information
goodtune authored Apr 13, 2024
1 parent 6f87608 commit 296295c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tournamentcontrol/competition/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,9 +611,9 @@ def __init__(self, *args, **kwargs):
def save(self, *args, **kwargs):
if self.instance.pk and "teams" in self.fields:
if self._undecided:
self.instance.undecided_teams = self.cleaned_data.get("teams")
self.instance.undecided_teams.set(self.cleaned_data.get("teams"))
else:
self.instance.teams = self.cleaned_data.get("teams")
self.instance.teams.set(self.cleaned_data.get("teams"))
return super(StageGroupForm, self).save(*args, **kwargs)

class Meta:
Expand Down

0 comments on commit 296295c

Please sign in to comment.