From b6409fbf954fa52e4555e4b122210b791f5be33c Mon Sep 17 00:00:00 2001
From: Jorrit Schaap <schaap@astron.nl>
Date: Tue, 17 Nov 2020 13:25:16 +0100
Subject: [PATCH] TMSS-190: check for key 'time.at'

---
 .../scheduling/lib/constraints/template_constraints_v1.py       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/SAS/TMSS/services/scheduling/lib/constraints/template_constraints_v1.py b/SAS/TMSS/services/scheduling/lib/constraints/template_constraints_v1.py
index 1a4b74c94c3..247f89851cc 100644
--- a/SAS/TMSS/services/scheduling/lib/constraints/template_constraints_v1.py
+++ b/SAS/TMSS/services/scheduling/lib/constraints/template_constraints_v1.py
@@ -140,7 +140,7 @@ def get_earliest_possible_start_time(scheduling_unit: models.SchedulingUnitBluep
     constraints = scheduling_unit.draft.scheduling_constraints_doc
 
     try:
-        if has_manual_scheduler_constraint(scheduling_unit):
+        if has_manual_scheduler_constraint(scheduling_unit) and 'at' in constraints['time']:
             at = parser.parse(constraints['time']['at'], ignoretz=True)
             return at
 
-- 
GitLab