From 676b2ef54bc69d895de949447be81f34ecd26955 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Sat, 8 Dec 2012 18:25:04 -0600 Subject: [PATCH] fixed issue 1208 (auth on GAE) by disabling virtual fields in auth.user on GAE --- VERSION | 2 +- gluon/tools.py | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/VERSION b/VERSION index d3d509cc..e04728f6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.3.0 (2012-12-07 10:57:44) rc1 +Version 2.3.0 (2012-12-08 18:24:15) rc1 diff --git a/gluon/tools.py b/gluon/tools.py index b7462d2f..a3018cae 100644 --- a/gluon/tools.py +++ b/gluon/tools.py @@ -1763,10 +1763,14 @@ class Auth(object): """ login the user = db.auth_user(id) """ - user = Storage(user) - for key,value in user.items(): - if callable(value) or key=='password': - del user[key] + from gluon.settings import global_settings + if global_settings.web2py_runtime_gae: + user = Row(self.db.auth_user._filter_fields(user, id=True)) + else: + user = Row(user) + for key,value in user.items(): + if callable(value) or key=='password': + delattr(user,key) current.session.auth = Storage( user = user, last_visit=current.request.now,