skip virtual fields on AttributeError

This commit is contained in:
mdipierro committed 2013-09-18 08:29:31 -05:00
1 parent c2cdae0615
commit 53e79915fa
2 files changed
+7 -1

No files matched your search

+1 -1
View File
@@ -1 +1 @@
Version 2.6.3-stable+timestamp.2013.09.17.08.30.14 Version 2.6.3-stable+timestamp.2013.09.18.08.28.35
+6
View File
@@ -2150,9 +2150,15 @@ class BaseAdapter(ConnectionPool):
for row in rowsobj.records: for row in rowsobj.records:
box = row[tablename] box = row[tablename]
for f,v in fields_virtual: for f,v in fields_virtual:
try:
box[f] = v.f(row) box[f] = v.f(row)
except AttributeError:
pass # not enough fields to define virtual field
for f,v in fields_lazy: for f,v in fields_lazy:
try:
box[f] = (v.handler or VirtualCommand)(v.f,row) box[f] = (v.handler or VirtualCommand)(v.f,row)
except AttributeError:
pass # not enough fields to define virtual field
### old style virtual fields ### old style virtual fields
for item in table.virtualfields: for item in table.virtualfields: