From 3283ce144cffa5c060600e990992a55340f5aef6 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Tue, 21 Aug 2012 17:42:01 -0500 Subject: [PATCH] fixed a problem with lazy tables and self.__dict__=self magic --- VERSION | 2 +- gluon/dal.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 34d6208e..3918e707 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.00.0 (2012-08-21 15:56:50) dev +Version 2.00.0 (2012-08-21 17:41:57) dev diff --git a/gluon/dal.py b/gluon/dal.py index a6248424..1b503353 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -6983,6 +6983,9 @@ def index(): def __getitem__(self, key): key = str(key) + return dict.__getitem__(self,key) + + def __getattr__(self, key): if not key is '_LAZY_TABLES' and key in self._LAZY_TABLES: tablename, fields, args = self._LAZY_TABLES.pop(key) return self.lazy_define_table(tablename,*fields,**args)