another parse_as_rest patch, thanks Denes

This commit is contained in:
Massimo
2013-01-15 13:19:54 -06:00
parent cea9145400
commit 97385d3310
2 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.4.1-alpha.2+timestamp.2013.01.15.13.09.31
Version 2.4.1-alpha.2+timestamp.2013.01.15.13.19.22
+4 -2
View File
@@ -7378,8 +7378,10 @@ def index():
selfld = '_id'
if db[table][field].type.startswith('reference '):
refs = [ x.name for x in db[otable] if x.type == db[table][field].type ]
if refs:
selfld = refs[0]
else:
refs = [ x.name for x in db[table]._referenced_by if x.tablename==otable ]
if refs:
selfld = refs[0]
if nested_select:
try:
dbset=db(db[table][field].belongs(dbset._select(db[otable][selfld])))