diff options
author | Matthew Lemon <matt@matthewlemon.com> | 2020-08-27 15:24:15 +0100 |
---|---|---|
committer | Matthew Lemon <matt@matthewlemon.com> | 2020-08-27 15:24:15 +0100 |
commit | 0b1c397af82abd41e4379bd1f1eab490fe22db38 (patch) | |
tree | 4f1103fdb7b3183d6c26de9975fe94dcccf945cc /ctrack/organisations/models.py | |
parent | de0bbafec7d1aac5aaf9c672678c257b62f14d67 (diff) |
further work trying to get user views working
Diffstat (limited to 'ctrack/organisations/models.py')
-rw-r--r-- | ctrack/organisations/models.py | 7 |
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( |