From 9a3d625acaef39cad6fb71f43050dc21286baffc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rn=20K=C3=BCnsem=C3=B6ller?=
 <jkuensem@physik.uni-bielefeld.de>
Date: Tue, 4 May 2021 18:13:42 +0200
Subject: [PATCH] TMSS-703: Fix issues after merge

---
 .../tmss/tmssapp/migrations/0001_initial.py    |  2 +-
 .../src/tmss/tmssapp/models/specification.py   | 18 ------------------
 .../test/t_tmssapp_specification_django_API.py |  2 +-
 3 files changed, 2 insertions(+), 20 deletions(-)

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 ad1c85a8716..664d10fa256 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 d1979a287a4..130cf7a6686 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 cf04c92ecdd..ca34a170f93 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))
-- 
GitLab