Skip to content
Snippets Groups Projects
Commit c1a04bdf authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

TMSS-215: PROTECT against deletion

parent 78a7cd8e
No related branches found
No related tags found
1 merge request!197Resolve TMSS-215
...@@ -389,7 +389,7 @@ class SchedulingUnitDraft(NamedCommon): ...@@ -389,7 +389,7 @@ class SchedulingUnitDraft(NamedCommon):
generator_instance_doc = JSONField(null=True, help_text='Parameter value that generated this run draft (NULLable).') 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.') 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.') 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): def save(self, force_insert=False, force_update=False, using=None, update_fields=None):
if self.requirements_doc: if self.requirements_doc:
......
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