manager: warn if exception start and end times are identical (#21256)
This commit is contained in:
parent
6b2d77ef88
commit
f69b81f88c
|
@ -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']
|
||||
|
||||
|
|
Loading…
Reference in New Issue