Fix issue 5422 Resend verification fails
authorAndrew Browning <ayleph@thisshitistemp.com>
Sun, 21 Feb 2016 22:49:53 +0000 (17:49 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Mon, 22 Feb 2016 22:43:38 +0000 (14:43 -0800)
If a user was logged in and already verified, the resend_verification
link would cause a server error. This fix addresses that by using the
correct syntax to query the username from the request.

mediagoblin/auth/views.py

index 03a46f7b5944c8e907b110b2a94ffc0e864bf718..2f95fd8114ae7c4e153828d916dd1be00962ad1a 100644 (file)
@@ -195,7 +195,7 @@ def resend_activation(request):
             messages.ERROR,
             _("You've already verified your email address!"))
 
-        return redirect(request, "mediagoblin.user_pages.user_home", user=request.user['username'])
+        return redirect(request, "mediagoblin.user_pages.user_home", user=request.user.username)
 
     email_debug_message(request)
     send_verification_email(request.user, request)