aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/organisations/models.py
diff options
context:
space:
mode:
authorMatthew Lemon <matt@matthewlemon.com>2020-08-27 15:24:15 +0100
committerMatthew Lemon <matt@matthewlemon.com>2020-08-27 15:24:15 +0100
commit0b1c397af82abd41e4379bd1f1eab490fe22db38 (patch)
tree4f1103fdb7b3183d6c26de9975fe94dcccf945cc /ctrack/organisations/models.py
parentde0bbafec7d1aac5aaf9c672678c257b62f14d67 (diff)
further work trying to get user views working
Diffstat (limited to 'ctrack/organisations/models.py')
-rw-r--r--ctrack/organisations/models.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/ctrack/organisations/models.py b/ctrack/organisations/models.py
index 78e4801..1c914b5 100644
--- a/ctrack/organisations/models.py
+++ b/ctrack/organisations/models.py
@@ -162,6 +162,13 @@ class Organisation(models.Model):
out.extend(list(es.systems.all()))
return out
+ def systems_for_each_essential_service(self):
+ ess = self.essentialservice_set.all()
+ out = []
+ for es in ess:
+ out.extend(es.systems.all())
+ return out
+
class Address(models.Model):
organisation = models.ForeignKey(