diff --git a/aleksis/core/migrations/0071_constrain_calendar_event_starting_before_ending.py b/aleksis/core/migrations/0071_constrain_calendar_event_starting_before_ending.py index 4567be58802a4cf10af826e705055adfbe8d459d..34e54bc450a4cba17555101709d0ab4676ca0290 100644 --- a/aleksis/core/migrations/0071_constrain_calendar_event_starting_before_ending.py +++ b/aleksis/core/migrations/0071_constrain_calendar_event_starting_before_ending.py @@ -10,7 +10,7 @@ class Migration(migrations.Migration): operations = [ migrations.AddConstraint( model_name='calendarevent', - constraint=models.CheckConstraint(check=Q(datetime_end__gt=F('datetime_start')), + constraint=models.CheckConstraint(check=Q(datetime_end__gte=F('datetime_start')), name="datetime_start_before_end" ), ), diff --git a/aleksis/core/models.py b/aleksis/core/models.py index fcf9384b276b989b2cf6e03eead5446a6046aa1b..b632d4353d3557b424b22e522eb7e4b587b03fda 100644 --- a/aleksis/core/models.py +++ b/aleksis/core/models.py @@ -1707,7 +1707,7 @@ class CalendarEvent(CalendarEventMixin, ExtensiblePolymorphicModel, RecurrenceMo name="datetime_end_or_date_end", ), models.CheckConstraint( - check=Q(datetime_end__gt=F("datetime_start")), name="datetime_start_before_end" + check=Q(datetime_end__gte=F("datetime_start")), name="datetime_start_before_end" ), models.CheckConstraint( check=Q(date_end__gte=F("date_start")), name="date_start_before_end"