aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/caf
diff options
context:
space:
mode:
authorMatthew Lemon <matt@matthewlemon.com>2020-08-27 15:24:15 +0100
committerMatthew Lemon <matt@matthewlemon.com>2020-08-27 15:24:15 +0100
commit0b1c397af82abd41e4379bd1f1eab490fe22db38 (patch)
tree4f1103fdb7b3183d6c26de9975fe94dcccf945cc /ctrack/caf
parentde0bbafec7d1aac5aaf9c672678c257b62f14d67 (diff)
further work trying to get user views working
Diffstat (limited to 'ctrack/caf')
-rw-r--r--ctrack/caf/models.py2
-rw-r--r--ctrack/caf/views.py4
2 files changed, 3 insertions, 3 deletions
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)