Commit 0b5dda56 by Őry Máté

dashboard: don't redirect un/subscribing anonymous

parent 6f46efda
......@@ -2611,6 +2611,12 @@ class UnsubscribeFormView(SuccessMessageMixin, UpdateView):
template_name = "dashboard/unsubscribe.html"
success_message = _("Successfully modified subscription.")
def get_success_url(self):
if self.request.user.is_authenticated():
return super(UnsubscribeFormView, self).get_success_url()
else:
return self.request.path
@classmethod
def get_salt(cls):
return unicode(cls)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment