Fix a date arithmetic bug.

- Legacy-Id: 13484
This commit is contained in:
Henrik Levkowetz 2017-06-01 17:28:55 +00:00
parent 0fdaf2c9dc
commit be28c2b2db

View file

@ -84,7 +84,7 @@ class InterimSessionInlineFormSet(BaseInlineFormSet):
dates.sort()
last_date = dates[0]
for date in dates[1:]:
if last_date.day + 1 != date.day:
if date - last_date != datetime.timedelta(days=1):
raise forms.ValidationError('For Multi-Day meetings, days must be consecutive')
last_date = date