From 2d8c4d9c52365d521f87eb88fd201c8a2df95f37 Mon Sep 17 00:00:00 2001 From: Jorrit Schaap <schaap@astron.nl> Date: Mon, 30 May 2022 13:28:45 +0200 Subject: [PATCH] no need to validate the template upong saving an SUD. Fails on production against old templates. --- SAS/TMSS/backend/src/tmss/tmssapp/models/specification.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/SAS/TMSS/backend/src/tmss/tmssapp/models/specification.py b/SAS/TMSS/backend/src/tmss/tmssapp/models/specification.py index 042fd9a40b2..1192f382c85 100644 --- a/SAS/TMSS/backend/src/tmss/tmssapp/models/specification.py +++ b/SAS/TMSS/backend/src/tmss/tmssapp/models/specification.py @@ -712,12 +712,6 @@ class SchedulingUnitDraft(NamedCommon, TemplateSchemaMixin, ProjectPropertyMixin constraints = [CheckConstraint(check=Q(rank__gte=SchedulingUnitRank.HIGHEST.value) & Q(rank__lte=SchedulingUnitRank.LOWEST.value), name='schedulingunitdraft_rank_range_constraint')] def save(self, force_insert=False, force_update=False, using=None, update_fields=None): - if self.specifications_template_id and self.specifications_template.schema is not None: - # If this scheduling unit was created from an observation_strategy_template, - # then make sure that the observation_strategy_template validates against this unit's specifications_template.schema - if self.observation_strategy_template_id and self.observation_strategy_template.template: - self.specifications_template.validate_document(self.observation_strategy_template.template) - # This code only happens if the objects is not in the database yet. self._state.adding is True creating if self._state.adding: if hasattr(self, 'scheduling_set') and self.scheduling_set.project.auto_ingest is False: -- GitLab