From eb3b698847eb7c70e6888fa95d6080ce7bf5a54b Mon Sep 17 00:00:00 2001
From: Jorrit Schaap <schaap@astron.nl>
Date: Thu, 19 Nov 2020 14:19:27 +0100
Subject: [PATCH] TMSS-190: do not check for dynamic_scheduling_enable here
 (but let the responsibility in the dynamic_scheduler)

---
 SAS/TMSS/src/tmss/tmssapp/subtasks.py | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/SAS/TMSS/src/tmss/tmssapp/subtasks.py b/SAS/TMSS/src/tmss/tmssapp/subtasks.py
index ecd413cc603..2c0a5a50dbc 100644
--- a/SAS/TMSS/src/tmss/tmssapp/subtasks.py
+++ b/SAS/TMSS/src/tmss/tmssapp/subtasks.py
@@ -614,12 +614,6 @@ def check_prerequities_for_scheduling(subtask: Subtask) -> bool:
             raise SubtaskSchedulingException("Cannot schedule subtask id=%d because its predecessor id=%s in not FINISHED but state=%s"
                                              % (subtask.pk, predecessor.pk, predecessor.state.value))
 
-    # check if settings allow scheduling observations
-    setting = Setting.objects.get(name='dynamic_scheduling_enabled')
-    if not setting.value:
-        raise SubtaskSchedulingException("Cannot schedule subtask id=%d because setting %s=%s does not allow that." %
-                                         (subtask.pk, setting.name, setting.value))
-
     return True
 
 def _assign_or_unassign_resources(subtask: Subtask):
-- 
GitLab