diff options
Diffstat (limited to 'ctrack/caf/views.py')
-rw-r--r-- | ctrack/caf/views.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ctrack/caf/views.py b/ctrack/caf/views.py index 2bfe7ad..003cb18 100644 --- a/ctrack/caf/views.py +++ b/ctrack/caf/views.py @@ -63,6 +63,16 @@ class ApplicableSystemCreateFromOrg(LoginRequiredMixin, FormView): context["organisation"] = Organisation.objects.get(slug=self.kwargs["slug"]) return context + def form_valid(self, form): + ass = ApplicableSystem.objects.create( + name=form.cleaned_data["name"], + description=form.cleaned_data["description"], + organisation=form.cleaned_data["organisation"], + caf=form.cleaned_data["caf"] + ) + return super().form_valid(form) + + def get_form_kwargs(self): kwargs = super().get_form_kwargs() org = Organisation.objects.get(slug=self.kwargs["slug"]) |