From 5ae73a5beae08a7a5307bb77a2c1cf7caae8082b Mon Sep 17 00:00:00 2001 From: Jorrit Schaap <schaap@astron.nl> Date: Tue, 30 May 2023 17:37:45 +0200 Subject: [PATCH] TMSS-2538: fix, patch for today's rollout --- SAS/TMSS/backend/services/scheduling/lib/constraints.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SAS/TMSS/backend/services/scheduling/lib/constraints.py b/SAS/TMSS/backend/services/scheduling/lib/constraints.py index 1b5833804fa..718c009921e 100644 --- a/SAS/TMSS/backend/services/scheduling/lib/constraints.py +++ b/SAS/TMSS/backend/services/scheduling/lib/constraints.py @@ -1889,7 +1889,7 @@ def get_blocking_scheduled_units(scheduling_unit: models.SchedulingUnitBlueprint # Third, loop over the small number of overlapping scheduled units, and only keep the ones sharing one or more stations candidate_stations = set(scheduling_unit.main_observation_stations) - observation_overlapping_scheduled_units = [s for s in overlapping_scheduled_units.all() + observation_overlapping_scheduled_units = [s for s in observation_overlapping_scheduled_units if any(set(s.main_observation_stations).intersection(candidate_stations))] # Finally, return the result as a queryset, so the caller can do furter queries on it. -- GitLab