diff --git a/SAS/TMSS/backend/src/tmss/tmssapp/views.py b/SAS/TMSS/backend/src/tmss/tmssapp/views.py index 99cc08fad4cc41b23f5922b62ecc65ba46dfdc92..3f5002320c16030c48b03d307414e927857c69bc 100644 --- a/SAS/TMSS/backend/src/tmss/tmssapp/views.py +++ b/SAS/TMSS/backend/src/tmss/tmssapp/views.py @@ -588,17 +588,17 @@ def daily_scheduling_constraints_overview(request, datestamp: str=None): description = '''<p>This page shows all scheduling constraints plots for the scheduling_units on %s<ul>''' % (datestamp_str,) table_rows = '' - scheduling_units = [] - if date_start < datetime.utcnow(): - # add the daily_schedule_plot - description += '''<li>the 24h view showing all elevations for all units in one plot</li>''' - table_rows += '''<tr><td><img src="/api/daily_schedule_plot/%s"/></td></tr>\n''' % (datestamp_str,) - - # add all already scheduled/run scheduling_units for this date - description += '''<li>all scheduled/observed scheduling_units on this date</li>''' - scheduling_units.extend(SchedulingUnitBlueprint.objects.filter(obsolete_since__isnull=True, - scheduled_start_time__lte=date_end, - scheduled_stop_time__gte=date_start).all()) + # add the daily_schedule_plot + description += '''<li>the 24h view showing all elevations for all units in one plot</li>''' + table_rows += '''<tr><td><img src="/api/daily_schedule_plot/%s"/></td></tr>\n''' % (datestamp_str,) + + # add all already scheduled/run scheduling_units for this date + description += '''<li>all scheduled/observed scheduling_units on this date</li>''' + scheduling_units = SchedulingUnitBlueprint.objects.filter(obsolete_since__isnull=True, + scheduled_start_time__lte=date_end, + scheduled_stop_time__gte=date_start) + scheduling_units = scheduling_units.exclude(status__value__in=SchedulingUnitStatus.PRE_ACTIVE_STATUS_VALUES) + scheduling_units = list(scheduling_units.all()) if date_end > datetime.utcnow(): # add all not-scheduled-yet scheduling_units