Merge branch 'master' of github.com:web2py/web2py
This commit is contained in:
+6
-1
@@ -220,7 +220,12 @@ class Request(Storage):
|
||||
|
||||
if is_json:
|
||||
try:
|
||||
json_vars = json_parser.load(body)
|
||||
# In Python 3 versions prior to 3.6 load doesn't accept bytes and
|
||||
# bytearray, so we read the body convert to native and use loads
|
||||
# instead of load.
|
||||
# This line can be simplified to json_vars = json_parser.load(body)
|
||||
# if and when we drop support for python versions under 3.6
|
||||
json_vars = json_parser.loads(to_native(body.read()))
|
||||
except:
|
||||
# incoherent request bodies can still be parsed "ad-hoc"
|
||||
json_vars = {}
|
||||
|
||||
+1
-1
@@ -3778,9 +3778,9 @@ class Auth(AuthAPI):
|
||||
if any(f.compute for f in extra_fields):
|
||||
user = table_user[self.user.id]
|
||||
self._update_session_user(user)
|
||||
self.update_groups()
|
||||
else:
|
||||
self.user.update(table_user._filter_fields(form.vars))
|
||||
|
||||
session.flash = self.messages.profile_updated
|
||||
self.log_event(log, self.user)
|
||||
callback(onaccept, form)
|
||||
|
||||
Reference in New Issue
Block a user