skip virtual fields on AttributeError

This commit is contained in:
mdipierro
2013-09-18 08:29:31 -05:00
parent c2cdae0615
commit 53e79915fa
2 changed files with 9 additions and 3 deletions
+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
+8 -2
View File
@@ -2150,9 +2150,15 @@ class BaseAdapter(ConnectionPool):
for row in rowsobj.records:
box = row[tablename]
for f,v in fields_virtual:
box[f] = v.f(row)
try:
box[f] = v.f(row)
except AttributeError:
pass # not enough fields to define virtual field
for f,v in fields_lazy:
box[f] = (v.handler or VirtualCommand)(v.f,row)
try:
box[f] = (v.handler or VirtualCommand)(v.f,row)
except AttributeError:
pass # not enough fields to define virtual field
### old style virtual fields
for item in table.virtualfields: