This commit is contained in:
Matt Wright
2012-07-11 16:38:26 -04:00
parent f35fa7f4d0
commit e7bd1533c4
+2 -1
View File
@@ -116,11 +116,12 @@ def authenticate():
except BadCredentialsError, e:
msg = str(e)
_logger.debug('Unsuccessful authentication attempt: %s' % msg)
if request.json:
return _json_auth_error(msg)
do_flash(msg, 'error')
_logger.debug('Unsuccessful authentication attempt: %s' % msg)
return redirect(request.referrer or _security.login_manager.login_view)