From 21955f0028d96517bfbffb16f887a6db40ab28fb Mon Sep 17 00:00:00 2001 From: Ernesto Rico Schmidt <ernesto@helsinki.at> Date: Wed, 23 Feb 2022 14:46:41 -0400 Subject: [PATCH] No longer reject and ignore schedules in the past --- program/models.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/program/models.py b/program/models.py index 17168f64..51199a17 100644 --- a/program/models.py +++ b/program/models.py @@ -221,9 +221,6 @@ class Schedule(models.Model): add_business_days_only = True if sdl.get('add_business_days_only') is True else False dstart = parse_date(str(sdl['dstart'])) - # Schedule mustn't start in the past when adding - if pk is None and dstart < timezone.now().date(): - dstart = timezone.now().date() tstart = sdl['tstart'] + ':00' if len(str(sdl['tstart'])) == 5 else sdl['tstart'] tend = sdl['tend'] + ':00' if len(str(sdl['tend'])) == 5 else sdl['tend'] @@ -615,10 +612,6 @@ class Schedule(models.Model): errors = {} for ts in conflicts['projected']: - if parse_datetime(ts['start']) <= timezone.now(): - # Ignore past dates - continue - # If no solution necessary # # - Create the projected timeslot and skip -- GitLab