diff options
Diffstat (limited to '')
-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( |