From c1a04bdf918440211e1d74275b389f569ad555fc Mon Sep 17 00:00:00 2001 From: Jorrit Schaap <schaap@astron.nl> Date: Wed, 19 Aug 2020 13:28:11 +0200 Subject: [PATCH] TMSS-215: PROTECT against deletion --- SAS/TMSS/src/tmss/tmssapp/models/specification.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SAS/TMSS/src/tmss/tmssapp/models/specification.py b/SAS/TMSS/src/tmss/tmssapp/models/specification.py index 1a4732233f4..6e9cb4c6cc2 100644 --- a/SAS/TMSS/src/tmss/tmssapp/models/specification.py +++ b/SAS/TMSS/src/tmss/tmssapp/models/specification.py @@ -389,7 +389,7 @@ class SchedulingUnitDraft(NamedCommon): generator_instance_doc = JSONField(null=True, help_text='Parameter value that generated this run draft (NULLable).') scheduling_set = ForeignKey('SchedulingSet', related_name='scheduling_unit_drafts', on_delete=CASCADE, help_text='Set to which this scheduling unit draft belongs.') requirements_template = ForeignKey('SchedulingUnitTemplate', on_delete=CASCADE, help_text='Schema used for requirements_doc.') - observation_strategy_template = ForeignKey('SchedulingUnitObservingStrategyTemplate', on_delete=CASCADE, null=True, help_text='Observation Strategy Template used to create the requirements_doc.') + observation_strategy_template = ForeignKey('SchedulingUnitObservingStrategyTemplate', on_delete=PROTECT, null=True, help_text='Observation Strategy Template used to create the requirements_doc.') def save(self, force_insert=False, force_update=False, using=None, update_fields=None): if self.requirements_doc: -- GitLab