From: stefan Date: Mon, 16 Feb 2009 22:43:07 +0000 (+0000) Subject: Fix issue2550505. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9522b30bd85336291476604ed9ef65402b7871e0;p=roundup.git Fix issue2550505. git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4136 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/roundup/backends/back_anydbm.py b/roundup/backends/back_anydbm.py index 17dfa78..0005f4d 100644 --- a/roundup/backends/back_anydbm.py +++ b/roundup/backends/back_anydbm.py @@ -1561,7 +1561,7 @@ class Class(hyperdb.Class): "sort" and "group" are (dir, prop) where dir is '+', '-' or None and prop is a prop name or None - "search_matches" is {nodeid: marker} or None + "search_matches" is a sequence type or None The filter must match all properties specificed. If the property value to match is a list: @@ -1721,7 +1721,7 @@ class Class(hyperdb.Class): if search_matches is not None: k = [] for v in matches: - if search_matches.has_key(v[0]): + if v[0] in search_matches: k.append(v) matches = k diff --git a/roundup/backends/rdbms_common.py b/roundup/backends/rdbms_common.py index 4b3b480..b5ce677 100644 --- a/roundup/backends/rdbms_common.py +++ b/roundup/backends/rdbms_common.py @@ -2114,7 +2114,7 @@ class Class(hyperdb.Class): backward-compatibility reasons a single (dir, prop) tuple is also allowed. - "search_matches" is {nodeid: marker} or None + "search_matches" is a sequence type or None The filter must match all properties specificed. If the property value to match is a list: @@ -2123,7 +2123,7 @@ class Class(hyperdb.Class): 2. Other properties must match any of the elements in the list. """ # we can't match anything if search_matches is empty - if search_matches == {}: + if not search_matches and search_matches is not None: return [] if __debug__: @@ -2334,8 +2334,7 @@ class Class(hyperdb.Class): # add results of full text search if search_matches is not None: - v = search_matches.keys() - s = ','.join([a for x in v]) + s = ','.join([a for x in search_matches]) where.append('_%s.id in (%s)'%(icn, s)) args = args + v diff --git a/roundup/hyperdb.py b/roundup/hyperdb.py index 637543c..b504061 100644 --- a/roundup/hyperdb.py +++ b/roundup/hyperdb.py @@ -707,7 +707,7 @@ All methods except __repr__ must be implemented by a concrete backend Database. raise NotImplementedError def getfile(self, classname, nodeid, property): - '''Store the content of the file in the database. + '''Get the content of the file in the database. ''' raise NotImplementedError @@ -1129,7 +1129,7 @@ class Class: backward-compatibility reasons a single (dir, prop) tuple is also allowed. - "search_matches" is {nodeid: marker} + "search_matches" is a sequence type The filter must match all properties specificed. If the property value to match is a list: