aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/organisations/views.py
diff options
context:
space:
mode:
authorMatthew Lemon <matt@matthewlemon.com>2020-09-02 12:04:19 +0100
committerMatthew Lemon <matt@matthewlemon.com>2020-09-02 12:04:19 +0100
commitedd91cb77191b386af95dfaca0b2706c7ee143b9 (patch)
treeb94edf8e069911d0aea4e1acfc23a72a180cb2cf /ctrack/organisations/views.py
parent15c89a78c097dc00ad7b8ca3314581ed3b058187 (diff)
parentc406d3da83d20d65c2fc4da7d5d4d5db0f6ad115 (diff)
Merge branch 'db_rewrite' into master
Diffstat (limited to 'ctrack/organisations/views.py')
-rw-r--r--ctrack/organisations/views.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ctrack/organisations/views.py b/ctrack/organisations/views.py
index 394966a..7652783 100644
--- a/ctrack/organisations/views.py
+++ b/ctrack/organisations/views.py
@@ -10,6 +10,7 @@ from ctrack.register.models import EngagementEvent
from .forms import AddressInlineFormSet, IncidentReportForm, OrganisationCreateForm
from .models import IncidentReport, Organisation, Person
+from ctrack.caf.models import EssentialService
class PersonListView(LoginRequiredMixin, PermissionRequiredMixin, ListView):
@@ -66,6 +67,7 @@ class OrganisationDetailView(LoginRequiredMixin, PermissionRequiredMixin, Detail
org = kwargs["object"]
peoples = org.person_set.all()
engagement_events = EngagementEvent.objects.filter(participants__in=peoples)
+ essential_services = EssentialService.objects.filter(organisation=org)
no_addr = org.addresses.count()
if no_addr > 1:
context["no_addr"] = no_addr
@@ -77,9 +79,10 @@ class OrganisationDetailView(LoginRequiredMixin, PermissionRequiredMixin, Detail
context["addr"] = addr
people = org.person_set.all()
context["people"] = people
- applicable_systems = org.applicablesystem_set.all()
+ applicable_systems = org.applicable_systems()
context["applicable_systems"] = applicable_systems
context["engagement_events"] = engagement_events
+ context["essential_services"] = essential_services
return context