diff options
Diffstat (limited to 'ctrack/core')
-rw-r--r-- | ctrack/core/tests/test_views.py | 2 | ||||
-rw-r--r-- | ctrack/core/views.py | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/ctrack/core/tests/test_views.py b/ctrack/core/tests/test_views.py index 9f7d292..dde7b81 100644 --- a/ctrack/core/tests/test_views.py +++ b/ctrack/core/tests/test_views.py @@ -1,7 +1,7 @@ import pytest from ctrack.organisations.models import Organisation, Submode, Mode -from ctrack.organisations.views import inspectors_for_each_mode +from ctrack.organisations.utils import inspectors_for_each_mode from ctrack.organisations.tests.factories import OrganisationFactory pytestmark = pytest.mark.django_db diff --git a/ctrack/core/views.py b/ctrack/core/views.py index 499aedd..5268f66 100644 --- a/ctrack/core/views.py +++ b/ctrack/core/views.py @@ -3,6 +3,7 @@ from django.shortcuts import render from ctrack.caf.models import EssentialService, CAF, ApplicableSystem from ctrack.organisations.models import IncidentReport, Organisation, Person, Submode +from ctrack.organisations.utils import inspectors_for_each_mode from ctrack.register.models import EngagementEvent @@ -33,6 +34,8 @@ def home_page(request): no_essential_services = EssentialService.objects.count() no_systems = ApplicableSystem.objects.count() submodes = Submode.objects.all().order_by("descriptor") + submode_inspector_dict = inspectors_for_each_mode("lead_inspector") + submode_deputy_inspector_dict = inspectors_for_each_mode("deputy_lead_inspector") context = { "no_orgs": no_orgs, "no_people": no_people, @@ -41,5 +44,7 @@ def home_page(request): "no_systems": no_systems, "caf_users": caf_users, "submodes": submodes, + "submode_inspector_dict": submode_inspector_dict, + "submode_deputy_inspector_dict": submode_deputy_inspector_dict, } return render(request, "pages/home.html", context) |