aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/caf/views.py
diff options
context:
space:
mode:
authorMR Lemon <matt@matthewlemon>2020-04-24 20:33:40 +0100
committerMR Lemon <matt@matthewlemon>2020-04-24 20:33:40 +0100
commitdeaa85227e47dd70301f88caca87edb0ad3f8adf (patch)
treede6ea5623df3ba6de94c2ddadf85ae8e5fc8f449 /ctrack/caf/views.py
parent301154e0a48ea2e2966afa92912317367dfcbe1b (diff)
made create forms more consistent
Diffstat (limited to 'ctrack/caf/views.py')
-rw-r--r--ctrack/caf/views.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ctrack/caf/views.py b/ctrack/caf/views.py
index 5308421..0cee746 100644
--- a/ctrack/caf/views.py
+++ b/ctrack/caf/views.py
@@ -60,6 +60,7 @@ class ApplicableSystemDetail(LoginRequiredMixin, DetailView):
@login_required
def applicable_system_create_from_caf(request, caf_id):
org_id = CAF.objects.get(pk=caf_id).organisation().id
+ caf = CAF.objects.get(id=caf_id)
if request.method=="POST":
form = ApplicableSystemCreateFromCafForm(request.POST, caf_id=caf_id, org_id=org_id)
if form.is_valid():
@@ -73,7 +74,7 @@ def applicable_system_create_from_caf(request, caf_id):
else:
form = ApplicableSystemCreateFromCafForm(caf_id=caf_id, org_id=org_id)
- return render(request, "caf/applicable_system_create_from_caf.html", {"form": form})
+ return render(request, "caf/applicable_system_create_from_caf.html", {"form": form, "caf": caf})
class ApplicableSystemCreateFromOrg(LoginRequiredMixin, FormView):