Skip to content

Commit 01cef2a

Browse files
author
Richard Jones
committed
work-around for sqlite bug
1 parent 6d71862 commit 01cef2a

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

roundup/backends/rdbms_common.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: rdbms_common.py,v 1.22 2002-10-08 04:11:16 richard Exp $
1+
# $Id: rdbms_common.py,v 1.23 2002-10-31 04:02:23 richard Exp $
22
''' Relational database (SQL) backend common code.
33
44
Basics:
@@ -1767,9 +1767,12 @@ def filter(self, search_matches, filterspec, sort=(None,None),
17671767
xtra = ' or _%s is NULL'%k
17681768
else:
17691769
xtra = ''
1770-
s = ','.join([a for x in v])
1771-
where.append('(_%s in (%s)%s)'%(k, s, xtra))
1772-
args = args + v
1770+
if v:
1771+
s = ','.join([a for x in v])
1772+
where.append('(_%s in (%s)%s)'%(k, s, xtra))
1773+
args = args + v
1774+
else:
1775+
where.append('_%s is NULL'%k)
17731776
else:
17741777
if v == '-1':
17751778
v = None

0 commit comments

Comments
 (0)