diff roundup/backends/rdbms_common.py @ 1205:0df08772f166

fix to SQL filtering
author Richard Jones <richard@users.sourceforge.net>
date Wed, 25 Sep 2002 04:56:21 +0000
parents 735adcbfc665
children 8372eec95841
line wrap: on
line diff
--- a/roundup/backends/rdbms_common.py	Wed Sep 25 02:10:25 2002 +0000
+++ b/roundup/backends/rdbms_common.py	Wed Sep 25 04:56:21 2002 +0000
@@ -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 @@
             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 @@
         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()
 

Roundup Issue Tracker: http://roundup-tracker.org/