Commit adab75eb authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Fix comparison of board in 'validate_unique'

parent a189fe5e
......@@ -144,7 +144,7 @@ class Board(Committee):
super().validate_unique(*args, **kwargs)
for board in Board.objects.filter(since__year=self.since.year,
until__year=self.until.year):
if board is not self:
if board != self:
raise ValidationError({
'since': _('A board already exists for those years'),
'until': _('A board already exists for those years')})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment