catching AttributeError

This commit is contained in:
mdipierro
2012-08-28 15:36:05 -05:00
parent cd58e034ca
commit 56716e7a20
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.00.1 (2012-08-28 14:57:17) rc4
Version 2.00.1 (2012-08-28 15:36:00) rc4
+2 -2
View File
@@ -1880,7 +1880,7 @@ class BaseAdapter(ConnectionPool):
for item in table.virtualfields:
try:
rowsobj = rowsobj.setvirtualfields(**{tablename:item})
except KeyError:
except (KeyError, AttributeError):
# to avoid breaking virtualfields when partial select
pass
return rowsobj
@@ -6946,7 +6946,7 @@ def index():
ofields = vars.get('order',db[table]._id.name).split('|')
try:
orderby = [db[table][f] if not f.startswith('~') else ~db[table][f[1:]] for f in ofields]
except KeyError:
except (KeyError, AttributeError):
return Row({'status':400,'error':'invalid orderby','response':None})
fields = [field for field in db[table] if field.readable]
count = dbset.count()