From 8740fea7c1c10fb0c2648348eda5dbeab2e63236 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Wed, 30 Jan 2013 09:29:49 -0600 Subject: [PATCH] allow multiple left joins in grid --- VERSION | 2 +- gluon/sqlhtml.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 35c6106a..db093562 100644 --- a/VERSION +++ b/VERSION @@ -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 diff --git a/gluon/sqlhtml.py b/gluon/sqlhtml.py index bf9e8ea0..90ccf722 100644 --- a/gluon/sqlhtml.py +++ b/gluon/sqlhtml.py @@ -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,