aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/caf/models.py
diff options
context:
space:
mode:
authorMatthew Lemon <matt@matthewlemon.com>2020-03-06 17:52:48 +0000
committerMatthew Lemon <matt@matthewlemon.com>2020-03-06 17:52:48 +0000
commit420eb8308847e413d63b0692aba78cee7d1405f4 (patch)
tree9c0d78c01ac94abdc7db269a65d5314e98133a25 /ctrack/caf/models.py
parentd901a8af93efa94545b5bd6ab7a323786923cb67 (diff)
reverted idea to use a custom manager to include NIS POC in systems list
Diffstat (limited to 'ctrack/caf/models.py')
-rw-r--r--ctrack/caf/models.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ctrack/caf/models.py b/ctrack/caf/models.py
index a031657..bec59d6 100644
--- a/ctrack/caf/models.py
+++ b/ctrack/caf/models.py
@@ -56,11 +56,14 @@ class ApplicableSystem(models.Model):
class Meta:
verbose_name = "Applicable System"
- objects = ApplicableSystemManager()
+ def get_primary_contact(self):
+ return self.organisation.person_set.filter(primary_nis_contact=True)
def __str__(self):
return f"{self.organisation.name} | {self.name}"
+ objects = ApplicableSystemManager()
+
class CAF(models.Model):
quality_grading = models.ForeignKey(Grading, on_delete=models.CASCADE, blank=True, null=True,