From 99a4bf1d8116ef72e1cd8456261b2e74cb74e4c1 Mon Sep 17 00:00:00 2001
From: Vermaas <vermaas@astron.nl>
Date: Tue, 20 Feb 2024 17:11:29 +0100
Subject: [PATCH] identify summary task (datamodel change)

---
 atdb/taskdatabase/models.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/atdb/taskdatabase/models.py b/atdb/taskdatabase/models.py
index 2ed8ef87..d7dbbe95 100644
--- a/atdb/taskdatabase/models.py
+++ b/atdb/taskdatabase/models.py
@@ -220,6 +220,10 @@ class Task(models.Model):
         if (self.status != State.PROCESSED.value) & (self.new_status == State.PROCESSED.value):
             self.is_summary = check_if_summary(self)
 
+        # nv:20feb2024, same as above, but for backward compatibilty reasons.
+        # For tasks that are already beyond PROCESSED, but not yet ingested.
+        if (self.status != State.VALIDATED.value) & (self.new_status == State.VALIDATED.value):
+            self.is_summary = check_if_summary(self)
 
         # make sure that every task has an activity (also for backward compatibility)
         associate_task_with_activity(self)
-- 
GitLab