Don't try to log data that's not always available
authorMagnus Hagander <magnus@hagander.net>
Mon, 30 Oct 2017 14:25:37 +0000 (15:25 +0100)
committerMagnus Hagander <magnus@hagander.net>
Mon, 30 Oct 2017 14:25:37 +0000 (15:25 +0100)
pgweb/account/views.py

index 6416b7bebbe4eeae6585e259da25b568f3d04370..60f555fca89f91701bd97fdc6e9f0d10611bd637 100644 (file)
@@ -242,7 +242,7 @@ def resetpwd(request):
                                return HttpServerError("This account cannot change password as it's connected to a third party login site.")
                except User.DoesNotExist:
                        log.info("Attempting to reset password of {0}, user not found".format(request.POST['email']))
-       log.info("Initiating password set from {0} for {1}".format(get_client_ip(request), request.POST['email']))
+       log.info("Initiating password set from {0}".format(get_client_ip(request)))
        return authviews.password_reset(request, template_name='account/password_reset.html',
                                                                        email_template_name='account/password_reset_email.txt',
                                                                        post_reset_redirect='/account/reset/done/')