diff --git a/src/ctf_gameserver/web/scoring/forms.py b/src/ctf_gameserver/web/scoring/forms.py index 554d1f6..ea1bcd5 100644 --- a/src/ctf_gameserver/web/scoring/forms.py +++ b/src/ctf_gameserver/web/scoring/forms.py @@ -37,3 +37,13 @@ def clean_tick_duration(self): raise forms.ValidationError(_('The tick duration has to be a multitude of 60!')) return tick_duration + + def clean(self): + services_public = self.cleaned_data['services_public'] + start = self.cleaned_data['start'] + end = self.cleaned_data['end'] + + if services_public > start: + raise forms.ValidationError(_('Services public time must not be after start time')) + if end <= start: + raise forms.ValidationError(_('End time must be after start time'))