Skip to content

Commit a4339e0

Browse files
author
Richard Jones
committed
fix to SQL filtering
1 parent 79113d5 commit a4339e0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

roundup/backends/rdbms_common.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: rdbms_common.py,v 1.16 2002-09-24 07:39:52 richard Exp $
1+
# $Id: rdbms_common.py,v 1.17 2002-09-25 04:56:21 richard Exp $
22

33
# standard python modules
44
import sys, os, time, re, errno, weakref, copy
@@ -1663,6 +1663,10 @@ def filter(self, search_matches, filterspec, sort, group):
16631663
property value to match is a list, any one of the values in the
16641664
list may match for that property to match.
16651665
'''
1666+
# just don't bother if the full-text search matched diddly
1667+
if search_matches == {}:
1668+
return []
1669+
16661670
cn = self.classname
16671671

16681672
# figure the WHERE clause from the filterspec
@@ -1776,6 +1780,7 @@ def filter(self, search_matches, filterspec, sort, group):
17761780
args = tuple(args)
17771781
if __debug__:
17781782
print >>hyperdb.DEBUG, 'filter', (self, sql, args)
1783+
print sql
17791784
self.db.cursor.execute(sql, args)
17801785
l = self.db.cursor.fetchall()
17811786

0 commit comments

Comments
 (0)