From 3913f7ead10b6f98c3f9b4e5882336f75b6f1576 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Fri, 28 Aug 2020 11:25:10 +0100 Subject: fixed some more view bugs related to db redesign --- ctrack/caf/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ctrack/caf') diff --git a/ctrack/caf/views.py b/ctrack/caf/views.py index 4dbde02..aaeb90b 100644 --- a/ctrack/caf/views.py +++ b/ctrack/caf/views.py @@ -115,8 +115,8 @@ class ApplicableSystemCreateFromOrg( def get_form_kwargs(self): kwargs = super().get_form_kwargs() org = Organisation.objects.get(slug=self.kwargs["slug"]) - asses = org.applicablesystem_set.all() - org_cafs = {ass.caf for ass in asses} + asses = org.applicable_systems() + org_cafs = org.caf_set.all() kwargs["org_id"] = org.id kwargs["slug"] = org.slug kwargs["org_name"] = org.name -- cgit v1.2.3