From: richard Date: Wed, 26 Mar 2003 06:36:11 +0000 (+0000) Subject: match empty multilinks implemented for metakit X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9e084bb3c076a3ef232ca0d5a2f2f66a706462b9;p=roundup.git match empty multilinks implemented for metakit git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1633 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/roundup/backends/back_metakit.py b/roundup/backends/back_metakit.py index 13a6573..1837c69 100755 --- a/roundup/backends/back_metakit.py +++ b/roundup/backends/back_metakit.py @@ -1,4 +1,4 @@ -# $Id: back_metakit.py,v 1.43 2003-03-17 22:03:04 kedder Exp $ +# $Id: back_metakit.py,v 1.44 2003-03-26 06:36:11 richard Exp $ ''' Metakit backend for Roundup, originally by Gordon McMillan. @@ -908,7 +908,9 @@ class Class: if prop is None: prop = self.privateprops[propname] if isinstance(prop, hyperdb.Multilink): - if type(value) is not _LISTTYPE: + if value in ('-1', ['-1']): + value = [] + elif type(value) is not _LISTTYPE: value = [value] # transform keys to ids u = [] @@ -987,6 +989,8 @@ class Class: def ff(row, ml=mlcriteria): for propname, values in ml.items(): sv = getattr(row, propname) + if not values and sv: + return 0 for id in values: if sv.find(fid=id) == -1: return 0