manager: warn if exception start and end times are identical (#21256)

This commit is contained in:
Frédéric Péters 2018-01-18 13:40:26 +01:00
parent 6b2d77ef88
commit f69b81f88c
1 changed files with 1 additions and 1 deletions

View File

@ -107,7 +107,7 @@ class TimePeriodExceptionForm(forms.ModelForm):
}
def clean_end_datetime(self):
if self.cleaned_data['end_datetime'] < self.cleaned_data['start_datetime']:
if self.cleaned_data['end_datetime'] <= self.cleaned_data['start_datetime']:
raise ValidationError(_('End datetime must be greater than start datetime.'))
return self.cleaned_data['end_datetime']