# todo: when it was added, check if self.specifications_template.type.value == TaskType.Choices.OBSERVATION.value:
try:
duration=self.specifications_doc["duration"]
returnself.relative_start_time+duration
except:
pass
returnself.relative_start_time
# JK, 28/07/20: After discussion with Sander, we probably only want the
# - duration on the scheduling_unit draft (based on relative start/stop times)
# - duration plus relative start/stop on the task draft.
# This provides an estimate of what is currently planned out in the draft, but does not confuse with timestamps of actual start/stop of the blueprints.
# Only on the blueprints, we also aggregate start_stop times as they are in the system
# I'll leave these code bits here for now, until we made up our minds about this, but this can probably be removed
#
# @property
# def duration(self) -> float or None:
# '''returns the overall duration in seconds of all blueprints of this draft
# # todo: is this the wanted behavior? Do you want to consider all the blueprints created from your draft or do you want to preview a new blueprint?
# '''
# if self.start_time is None or self.stop_time is None: