Skip to content
Snippets Groups Projects
Verified Commit 3f415724 authored by Jonathan Weth's avatar Jonathan Weth :keyboard:
Browse files

Fix clean method of SchoolTerm (exclude wasn't done correctly)

parent 8612b134
No related branches found
No related tags found
1 merge request!327Resolve "Improve newly added filters"
......@@ -78,7 +78,7 @@ class SchoolTerm(ExtensibleModel):
qs = SchoolTerm.objects.within_dates(self.date_start, self.date_end)
if self.pk:
qs.exclude(pk=self.pk)
qs = qs.exclude(pk=self.pk)
if qs.exists():
raise ValidationError(
_("There is already a school term for this time or a part of this time.")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment