skip virtual fields on AttributeError
This commit is contained in:
@@ -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
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user