Commit 4bcad194 authored by Joost Rijneveld's avatar Joost Rijneveld
Browse files

Merge branch 'fix/board-comparison' into 'master'

Fix comparison of board in 'validate_unique'

See merge request !340
parents bf800596 adab75eb
......@@ -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