diff options
author | MR Lemon <matt@matthewlemon> | 2020-04-24 20:33:40 +0100 |
---|---|---|
committer | MR Lemon <matt@matthewlemon> | 2020-04-24 20:33:40 +0100 |
commit | deaa85227e47dd70301f88caca87edb0ad3f8adf (patch) | |
tree | de6ea5623df3ba6de94c2ddadf85ae8e5fc8f449 /ctrack/caf/views.py | |
parent | 301154e0a48ea2e2966afa92912317367dfcbe1b (diff) |
made create forms more consistent
Diffstat (limited to 'ctrack/caf/views.py')
-rw-r--r-- | ctrack/caf/views.py | 3 |
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): |