Skip to content
Snippets Groups Projects
Commit 03e108f6 authored by Reinder Kraaij's avatar Reinder Kraaij :eye:
Browse files

Merge branch 'TMSS-662' into 'master'

TMSS-662: fix another aggregation issue when SU has no on_sky_duration

Closes TMSS-662

See merge request !1249
parents 65714d50 8ef42161
No related branches found
Tags LOFAR-Release-4_4_75
1 merge request!1249TMSS-662: fix another aggregation issue when SU has no on_sky_duration
......@@ -709,7 +709,7 @@ class FailureReport():
affected_tasks = models.TaskBlueprint.objects.filter(system_events__in=system_events)
affected_units = (models.SchedulingUnitBlueprint.objects.filter(task_blueprints__in=affected_tasks))
for unit in affected_units.all():
for unit in affected_units.exclude(on_sky_start_time__isnull=True).all():
start_bin = datetime(year=unit.on_sky_start_time.year, month=unit.on_sky_start_time.month, day=1)
histogram[start_bin] = histogram.get(start_bin, 0) + (unit.on_sky_duration.total_seconds())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment