From 229e08df8e7454bbc7fcd545349bb6802e841db5 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Mon, 19 Oct 2020 10:14:35 +0100 Subject: fixed issue of not saving many-to-many field value --- ctrack/register/views.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ctrack/register/views.py') diff --git a/ctrack/register/views.py b/ctrack/register/views.py index 07673b9..db018b2 100644 --- a/ctrack/register/views.py +++ b/ctrack/register/views.py @@ -77,6 +77,10 @@ class SingleDateTimeEventCreate(FormView): form_class = CreateSimpleDateTimeEventForm success_url = reverse_lazy("organisations:list") + def get_success_url(self): + self.success_url = reverse_lazy("organisations:detail", args=[self.kwargs["org_slug"]]) + return super().get_success_url() + def get_context_data(self, **kwargs): context = super().get_context_data() if self.kwargs.get("org_slug"): -- cgit v1.2.3