add check that event_end must be greater than event_start

This commit is contained in:
2020-09-05 15:35:09 +00:00
parent 7a99e6d7fd
commit 3a72946206

View File

@@ -237,6 +237,8 @@ class FetMeeting(Event):
def clean(self):
if self.event_start is None:
raise ValidationError(_('Das Datum des Events fehlt.'))
elif self.event_end < self.event_start:
raise ValidationError(_('Das Ende des Events liegt vor dem Beginn.'))
slug = slugify(self.event_start.date()) + "-" + slugify("Fachschaftssitzung")