Fix a problem with Expressions in SQLTABLE possibly fixes #1735 and fixes web2py/pydal#487
This commit is contained in:
1 parent
2f5eb409b6
commit
4bfa9c1686
2 files changed
+5
-5
No files matched your search
+1
-1
@@ -3328,7 +3328,7 @@ class SQLTABLE(TABLE):
|
||||
return
|
||||
REGEX_TABLE_DOT_FIELD = sqlrows.db._adapter.REGEX_TABLE_DOT_FIELD
|
||||
fieldmap = dict(zip(sqlrows.colnames, sqlrows.fields))
|
||||
tablemap = dict(((f.tablename, f.table) for f in fieldmap.values()))
|
||||
tablemap = dict(((f.tablename, f.table) if isinstance(f, Field) else (f._table._tablename, f._table) for f in fieldmap.values()))
|
||||
for table in tablemap.values():
|
||||
pref = table._tablename + '.'
|
||||
fieldmap.update(((pref+f.name, f) for f in table._virtual_fields))
|
||||
|
||||
Reference in new issue
Block a user