aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/register/views.py
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-10-19 10:14:35 +0100
committerMatthew Lemon <lemon@matthewlemon.com>2020-10-19 10:14:35 +0100
commit229e08df8e7454bbc7fcd545349bb6802e841db5 (patch)
tree2517e9d057ee129c778f2f5b8715fc72745f5d68 /ctrack/register/views.py
parenteebcfa91fb68bc9d552fea4fba74786c99c066aa (diff)
fixed issue of not saving many-to-many field value
Diffstat (limited to '')
-rw-r--r--ctrack/register/views.py4
1 files changed, 4 insertions, 0 deletions
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"):