diff --git a/SAS/TMSS/backend/services/scheduling/lib/constraints.py b/SAS/TMSS/backend/services/scheduling/lib/constraints.py index b2e15a7161d8b5eac232eb342cded7d1ab6ca009..95b8b1dcb942219a95cf3738df5dbf4e0aaeef6b 100644 --- a/SAS/TMSS/backend/services/scheduling/lib/constraints.py +++ b/SAS/TMSS/backend/services/scheduling/lib/constraints.py @@ -1788,7 +1788,7 @@ def determine_unschedulable_reason_and_mark_unschedulable_if_needed(scheduling_u msg = "Scheduling units id=%s are blocking this unit from being scheduled" % (','.join(s.id for s in blocking_units), ) return mark_independent_subtasks_in_scheduling_unit_blueprint_as_unschedulable(scheduling_unit, msg) - if not can_run_without_used_stations(scheduling_unit, lower_bound=lower_bound, upper_bound=upper_bound): + if not can_run_without_used_stations(scheduling_unit, lower_bound=scheduling_unit.scheduled_observation_start_time, upper_bound=scheduling_unit.scheduled_observation_stop_time): missing_stations = get_missing_stations_for_scheduling_unit(scheduling_unit) msg = "Stations %s are already used" % (','.join([str(s) for s in missing_stations]), ) return mark_independent_subtasks_in_scheduling_unit_blueprint_as_unschedulable(scheduling_unit, msg)