allow multiple left joins in grid
This commit is contained in:
@@ -1 +1 @@
|
||||
Version 2.4.1-alpha.2+timestamp.2013.01.29.16.27.18
|
||||
Version 2.4.1-alpha.2+timestamp.2013.01.30.09.29.07
|
||||
|
||||
+4
-1
@@ -1867,7 +1867,10 @@ class SQLFORM(FORM):
|
||||
dbset = db(query)
|
||||
tablenames = db._adapter.tables(dbset.query)
|
||||
if left is not None:
|
||||
tablenames += db._adapter.tables(left)
|
||||
if not isinstance(left, (list, tuple)):
|
||||
left = [left]
|
||||
for join in left:
|
||||
tablenames += db._adapter.tables(join)
|
||||
tables = [db[tablename] for tablename in tablenames]
|
||||
if not fields:
|
||||
fields = reduce(lambda a, b: a + b,
|
||||
|
||||
Reference in New Issue
Block a user