Skip to content
Snippets Groups Projects
Commit 38e52d45 authored by HeJ's avatar HeJ
Browse files

backoffice: on invalid activation code a 500 was displayed

Caused by referencing an unbound variable in the logger.warning() call
-.-
parent 3180e32f
No related branches found
No related tags found
No related merge requests found
...@@ -84,6 +84,7 @@ class SignupDoneView(ConferenceMixin, TemplateView): ...@@ -84,6 +84,7 @@ class SignupDoneView(ConferenceMixin, TemplateView):
def signup_activate(request, uidb64, channel_id, token): def signup_activate(request, uidb64, channel_id, token):
try: try:
uid = force_text(urlsafe_base64_decode(uidb64)) uid = force_text(urlsafe_base64_decode(uidb64))
user, channel = None # ensure variables exists if any of the next two fail, otherwise the logger call fails
user = PlatformUser.objects.get(pk=uid) user = PlatformUser.objects.get(pk=uid)
channel = user.communication_channels.get(id=channel_id) channel = user.communication_channels.get(id=channel_id)
except Exception as err: except Exception as err:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment