aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/caf/models.py
diff options
context:
space:
mode:
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,