diff --git a/SAS/TMSS/src/tmss/tmssapp/models/scheduling.py b/SAS/TMSS/src/tmss/tmssapp/models/scheduling.py
index f250406f6e35263a43b47a21dbb436fe385815b0..63e35b38b17bd80b180be997be10843fd6fb5b35 100644
--- a/SAS/TMSS/src/tmss/tmssapp/models/scheduling.py
+++ b/SAS/TMSS/src/tmss/tmssapp/models/scheduling.py
@@ -162,13 +162,13 @@ class Subtask(BasicCommon):
     @property
     def specified_duration(self) -> timedelta:
         '''get the specified (or estimated) duration of this subtask based on the specified task duration and the subtask type'''
-        if self.specifications_template.type.value == SubtaskType.Choices.OBSERVATION:
+        if self.specifications_template.type.value == SubtaskType.Choices.OBSERVATION.value:
             # observations have a specified duration, so grab it from the spec.
             return timedelta(seconds=self.task_blueprint.specifications_doc.get('duration', 0))
 
-        if self.specifications_template.type.value == SubtaskType.Choices.PIPELINE:
+        if self.specifications_template.type.value == SubtaskType.Choices.PIPELINE.value:
             # pipelines usually do not have a specified duration, so make a guess (half the obs duration?).
-            return timedelta(seconds=self.task_blueprint.specifications_doc.get('duration', max(p.specified_duration for p in self.predecessors)/2))
+            return timedelta(seconds=self.task_blueprint.specifications_doc.get('duration', max(p.specified_duration.total_seconds() for p in self.predecessors)/2))
 
         # other subtasktypes usually depend on cpu/data/network etc. So, make a guess (for now)
         return timedelta(minutes=5)