diff --git a/SAS/TMSS/backend/src/tmss/tmssapp/migrations/0001_initial.py b/SAS/TMSS/backend/src/tmss/tmssapp/migrations/0001_initial.py index ad1c85a8716e2a5b9cc6eeab22aa60faebb5cd9a..664d10fa25687a243cfc038c2e16dc18f531701c 100644 --- a/SAS/TMSS/backend/src/tmss/tmssapp/migrations/0001_initial.py +++ b/SAS/TMSS/backend/src/tmss/tmssapp/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 3.0.9 on 2021-05-04 13:52 +# Generated by Django 3.0.9 on 2021-05-04 15:32 from django.conf import settings import django.contrib.postgres.fields diff --git a/SAS/TMSS/backend/src/tmss/tmssapp/models/specification.py b/SAS/TMSS/backend/src/tmss/tmssapp/models/specification.py index d1979a287a47d05a934a2e75632b99c7e67aaf94..130cf7a6686b0a19a637e427054062ad06899fb9 100644 --- a/SAS/TMSS/backend/src/tmss/tmssapp/models/specification.py +++ b/SAS/TMSS/backend/src/tmss/tmssapp/models/specification.py @@ -19,24 +19,6 @@ from collections import Counter from django.utils.functional import cached_property from lofar.sas.tmss.tmss.exceptions import BlueprintCreationException, TMSSException -# -# Mixins -# - -class ProjectPropertyMixin(RefreshFromDbInvalidatesCachedPropertiesMixin): - @cached_property - def project(self): # -> Project: - '''return the related project of this task - ''' - if not hasattr(self, 'path_to_project'): - return TMSSException("Please define a 'path_to_project' attribute on the object for the ProjectPropertyMixin to function.") - obj = self - for attr in self.path_to_project.split('__'): - obj = getattr(obj, attr) - if attr == 'project': - return obj - - # # I/O # diff --git a/SAS/TMSS/backend/test/t_tmssapp_specification_django_API.py b/SAS/TMSS/backend/test/t_tmssapp_specification_django_API.py index cf04c92ecdda1c9ed5e92b0465b450c6f57227df..ca34a170f939b580acaa43417836317fdb300a4d 100755 --- a/SAS/TMSS/backend/test/t_tmssapp_specification_django_API.py +++ b/SAS/TMSS/backend/test/t_tmssapp_specification_django_API.py @@ -849,7 +849,7 @@ class SchedulingUnitBlueprintTest(unittest.TestCase): scheduling_unit_blueprint.scheduling_constraints_doc = {'foo': 'matic'} scheduling_unit_blueprint.save() - def test_SchedulingUnitBlueprint_gets_created_with_correct_is_triggered_flag(self): + def test_SchedulingUnitBlueprint_gets_created_with_correct_is_triggered_flag(self): # setup project = models.Project.objects.create(**Project_test_data(can_trigger=True))