From: richard Date: Wed, 25 Sep 2002 04:56:21 +0000 (+0000) Subject: fix to SQL filtering X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=93bdb207496492ba67502ec69a194bbf538159d9;p=roundup.git fix to SQL filtering git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1229 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/roundup/backends/rdbms_common.py b/roundup/backends/rdbms_common.py index e9bef54..6f2c75b 100644 --- a/roundup/backends/rdbms_common.py +++ b/roundup/backends/rdbms_common.py @@ -1,4 +1,4 @@ -# $Id: rdbms_common.py,v 1.16 2002-09-24 07:39:52 richard Exp $ +# $Id: rdbms_common.py,v 1.17 2002-09-25 04:56:21 richard Exp $ # standard python modules import sys, os, time, re, errno, weakref, copy @@ -1663,6 +1663,10 @@ class Class(hyperdb.Class): property value to match is a list, any one of the values in the list may match for that property to match. ''' + # just don't bother if the full-text search matched diddly + if search_matches == {}: + return [] + cn = self.classname # figure the WHERE clause from the filterspec @@ -1776,6 +1780,7 @@ class Class(hyperdb.Class): args = tuple(args) if __debug__: print >>hyperdb.DEBUG, 'filter', (self, sql, args) + print sql self.db.cursor.execute(sql, args) l = self.db.cursor.fetchall()