From e9ca968d33a2e16aba70dd47ba7bf5ff8ca3b3ab Mon Sep 17 00:00:00 2001
From: jkuensem <jkuensem@physik.uni-bielefeld.de>
Date: Thu, 22 Oct 2020 13:37:50 +0200
Subject: [PATCH] TMSS-308: add subtask id to validation error

---
 SAS/TMSS/src/tmss/tmssapp/models/scheduling.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/SAS/TMSS/src/tmss/tmssapp/models/scheduling.py b/SAS/TMSS/src/tmss/tmssapp/models/scheduling.py
index 00d119f380c..b10dc6daf59 100644
--- a/SAS/TMSS/src/tmss/tmssapp/models/scheduling.py
+++ b/SAS/TMSS/src/tmss/tmssapp/models/scheduling.py
@@ -204,7 +204,7 @@ class Subtask(BasicCommon):
             sap_names = [pointing['name'] for pointing in self.specifications_doc['stations']['digital_pointings']]
             duplicate_names = [name for name in set(sap_names) if sap_names.count(name) > 1]
             if duplicate_names:
-                raise ValidationError("Pointings defined in the same Subtask must have unique names. Duplicate names are %s" % duplicate_names)
+                raise ValidationError("Pointings defined in the same Subtask must have unique names. Duplicate names %s in subtask id=%s." % (duplicate_names, self.pk))
 
         # check if we have a start time or there were predecessors
         if self.state.value == SubtaskState.Choices.SCHEDULED.value and self.__original_state_id == SubtaskState.Choices.SCHEDULING.value:
-- 
GitLab