diff --git a/applications/welcome/static/js/web2py.js b/applications/welcome/static/js/web2py.js index 22b9f253..8eaf54aa 100644 --- a/applications/welcome/static/js/web2py.js +++ b/applications/welcome/static/js/web2py.js @@ -335,7 +335,7 @@ } else { formData = form.serialize(); // Fallback for older browsers. } - web2py.ajax_page('post', url, formData, target, form); + web2py.ajax_page('post', url, formData, target); e.preventDefault(); }); diff --git a/gluon/contrib/simplejsonrpc.py b/gluon/contrib/simplejsonrpc.py index 0ffe8add..2769b09d 100644 --- a/gluon/contrib/simplejsonrpc.py +++ b/gluon/contrib/simplejsonrpc.py @@ -30,7 +30,7 @@ else: from io import StringIO import random import json - +from gluon._compat import basestring class JSONRPCError(RuntimeError): "Error object for remote procedure call fail" diff --git a/gluon/tools.py b/gluon/tools.py index e6421b88..a6d79678 100644 --- a/gluon/tools.py +++ b/gluon/tools.py @@ -3171,12 +3171,12 @@ class Auth(AuthAPI): formname='retrieve_password', dbio=False, onvalidation=onvalidation, hideerror=self.settings.hideerror): user = table_user(email=form.vars.email) - key = user.registration_key if not user: current.session.flash = \ self.messages.invalid_email redirect(self.url(args=request.args)) - elif key in ('pending', 'disabled', 'blocked') or (key or '').startswith('pending'): + key = user.registration_key + if key in ('pending', 'disabled', 'blocked') or (key or '').startswith('pending'): current.session.flash = \ self.messages.registration_pending redirect(self.url(args=request.args))