summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a29e79f)
raw | patch | inline | side by side (parent: a29e79f)
author | schlatterbeck <schlatterbeck@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Fri, 5 Mar 2010 14:22:34 +0000 (14:22 +0000) | ||
committer | schlatterbeck <schlatterbeck@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Fri, 5 Mar 2010 14:22:34 +0000 (14:22 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4470 57a73879-2fb5-44c3-a270-3262357dd7e2
roundup/backends/back_anydbm.py | patch | blob | history | |
test/db_test_base.py | patch | blob | history |
index 3962a637f3429b4e5dfa485f9b9348cddce23ab4..90cf05e461f17b9a0cb2268e97e08b9749f9e026 100644 (file)
elif isinstance(propclass, hyperdb.Number):
if type(v) != type([]):
- v = v.split(',')
+ try :
+ v = v.split(',')
+ except AttributeError :
+ v = [v]
l.append((OTHER, k, [float(val) for val in v]))
filterspec = l
diff --git a/test/db_test_base.py b/test/db_test_base.py
index bb4272ab75a4c0ad6b3593d024d716b93d54bfc7..4f68b79a66f9bc7e6023236ce2bc720946d4e03c 100644 (file)
--- a/test/db_test_base.py
+++ b/test/db_test_base.py
ae(filt(None, {'age': '1.5'}, ('+','id'), (None,None)), ['4'])
ae(filt(None, {'age': '2'}, ('+','id'), (None,None)), ['5'])
ae(filt(None, {'age': ['1','2']}, ('+','id'), (None,None)), ['3','5'])
+ ae(filt(None, {'age': 2}, ('+','id'), (None,None)), ['5'])
+ ae(filt(None, {'age': [1,2]}, ('+','id'), (None,None)), ['3','5'])
def testFilteringString(self):
ae, filt = self.filteringSetup()