diff options
author | Matthew Lemon <lemon@matthewlemon.com> | 2020-05-29 16:46:33 +0100 |
---|---|---|
committer | Matthew Lemon <lemon@matthewlemon.com> | 2020-05-29 16:46:33 +0100 |
commit | 02d0675d79fa52b86e569693dd5f20006294cf46 (patch) | |
tree | c322be409d043ed6eb3a37dec6e09735bc165620 /ctrack/core | |
parent | 3a6db2117ac430fab6ca20c4067ba60c030cd7f9 (diff) |
incident forms links to stakeholder home page now
Diffstat (limited to '')
-rw-r--r-- | ctrack/core/views.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ctrack/core/views.py b/ctrack/core/views.py index b80d212..4584612 100644 --- a/ctrack/core/views.py +++ b/ctrack/core/views.py @@ -1,7 +1,7 @@ from django.contrib.auth.decorators import login_required from django.shortcuts import render -from ctrack.organisations.models import Organisation +from ctrack.organisations.models import IncidentReport, Organisation @login_required @@ -10,11 +10,12 @@ def home_page(request): org = Organisation.objects.get( name=request.user.stakeholder.person.get_organisation_name() ) + irs = IncidentReport.objects.filter(organisation=org) systems = org.applicablesystem_set.all() return render( request, "pages/stakeholder_home.html", - context={"org": org, "systems": systems}, + context={"org": org, "systems": systems, "irs": irs}, ) else: return render(request, "pages/home.html") |