From 799425900392b05ad09a6dff2a42432fd56db166 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C4=93teris=20Caune?= Date: Fri, 24 Apr 2020 14:46:43 +0300 Subject: [PATCH] When an invited user logs in, redirect them to the new project --- hc/accounts/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hc/accounts/models.py b/hc/accounts/models.py index c70fd648..06c8d38f 100644 --- a/hc/accounts/models.py +++ b/hc/accounts/models.py @@ -282,7 +282,8 @@ class Project(models.Model): def invite(self, user): Member.objects.create(user=user, project=self) - user.profile.send_instant_login_link(self) + checks_url = reverse("hc-checks", args=[self.code]) + user.profile.send_instant_login_link(self, redirect_url=checks_url) def set_next_nag_date(self): """ Set next_nag_date on profiles of all members of this project. """