From 0b1c397af82abd41e4379bd1f1eab490fe22db38 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Thu, 27 Aug 2020 15:24:15 +0100 Subject: further work trying to get user views working --- ctrack/caf/models.py | 2 +- ctrack/caf/views.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'ctrack/caf') diff --git a/ctrack/caf/models.py b/ctrack/caf/models.py index b77cfdb..5fd586f 100644 --- a/ctrack/caf/models.py +++ b/ctrack/caf/models.py @@ -149,7 +149,7 @@ class CAF(models.Model): # return first_ass.organisation def sub_mode(self): - return self.organisation().submode + return self.organisation.submode def __str__(self): # Get the organisation and applicable system diff --git a/ctrack/caf/views.py b/ctrack/caf/views.py index 258774e..4eacd08 100644 --- a/ctrack/caf/views.py +++ b/ctrack/caf/views.py @@ -36,8 +36,8 @@ def caf_detail_view(request, pk): context = { "object": caf, "assessments_and_scores": _scrs, - "organisation": ApplicableSystem.objects.filter(caf=caf).first().organisation, - "systems": caf.applicable_systems.all(), + "organisation": caf.organisation, + "systems": caf.systems, } return render(request, "caf/caf_detail.html", context) -- cgit v1.2.3