diff roundup/backends/back_metakit.py @ 2601:113548baeed2

API clarification. Previously, the anydbm/bsddb/metakit filter() methods had required exact matches to Multilink argument lists. The RDBMS backends treated Multilink matches like all other data types - matching any of the Multilink argument list is good enough. The latter behaviour is implemented across the board now.
author Richard Jones <richard@users.sourceforge.net>
date Tue, 20 Jul 2004 22:56:18 +0000
parents c86b2179085b
children 5ccd99777869
line wrap: on
line diff
--- a/roundup/backends/back_metakit.py	Tue Jul 20 07:26:40 2004 +0000
+++ b/roundup/backends/back_metakit.py	Tue Jul 20 22:56:18 2004 +0000
@@ -1,4 +1,4 @@
-# $Id: back_metakit.py,v 1.79 2004-07-20 05:58:07 richard Exp $
+# $Id: back_metakit.py,v 1.80 2004-07-20 22:56:18 richard Exp $
 '''Metakit backend for Roundup, originally by Gordon McMillan.
 
 Known Current Bugs:
@@ -1313,12 +1313,12 @@
             def ff(row, ml=mlcriteria):
                 for propname, values in ml.items():
                     sv = getattr(row, propname)
-                    if not values and sv:
-                        return 0
+                    if not values and not sv:
+                        return 1
                     for id in values:
-                        if sv.find(fid=id) == -1:
-                            return 0
-                return 1
+                        if sv.find(fid=id) != -1:
+                            return 1
+                return 0
             iv = v.filter(ff)
             v = v.remapwith(iv)
 

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