From 98ad12a06c98d18178fb8eb304a5f2963d36289b Mon Sep 17 00:00:00 2001 From: mdipierro Date: Sat, 4 May 2013 10:24:26 -0500 Subject: [PATCH] db(query)(other if cond else None).select() --- VERSION | 2 +- gluon/dal.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index f7281edd..fe40e0e2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.4.6-stable+timestamp.2013.05.03.22.24.45 +Version 2.4.6-stable+timestamp.2013.05.04.10.23.42 diff --git a/gluon/dal.py b/gluon/dal.py index ffc599ed..39ebdad2 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -9744,7 +9744,9 @@ class Set(object): return '' % BaseAdapter.expand(self.db._adapter,self.query) def __call__(self, query, ignore_common_filters=False): - if isinstance(query,Table): + if query is None: + return self + elif isinstance(query,Table): query = self.db._adapter.id_query(query) elif isinstance(query,str): query = Expression(self.db,query)