diff options
author | Matthew Lemon <matt@matthewlemon.com> | 2020-08-28 11:25:10 +0100 |
---|---|---|
committer | Matthew Lemon <matt@matthewlemon.com> | 2020-08-28 11:25:10 +0100 |
commit | 3913f7ead10b6f98c3f9b4e5882336f75b6f1576 (patch) | |
tree | 935f6d1f2f73fcd7e2f6e52abed958392a371705 /ctrack/organisations/models.py | |
parent | 5f4e80b9c5c39e6eebb86edce20ffe107c03aa3e (diff) |
fixed some more view bugs related to db redesign
Diffstat (limited to '')
-rw-r--r-- | ctrack/organisations/models.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/ctrack/organisations/models.py b/ctrack/organisations/models.py index 1c914b5..f91dabf 100644 --- a/ctrack/organisations/models.py +++ b/ctrack/organisations/models.py @@ -153,20 +153,18 @@ class Organisation(models.Model): return self.person_set.filter(primary_nis_contact=True) def applicable_systems(self): - return self.applicablesystem_set.all() - - def systems(self): + # return self.applicablesystem_set.all() ess = self.essentialservice_set.all() out = [] for es in ess: - out.extend(list(es.systems.all())) + out.extend(es.systems.all()) return out - def systems_for_each_essential_service(self): + def systems(self): ess = self.essentialservice_set.all() out = [] for es in ess: - out.extend(es.systems.all()) + out.extend(list(es.systems.all())) return out |