Code

work-around for sqlite bug
authorrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Thu, 31 Oct 2002 04:02:23 +0000 (04:02 +0000)
committerrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Thu, 31 Oct 2002 04:02:23 +0000 (04:02 +0000)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1369 57a73879-2fb5-44c3-a270-3262357dd7e2

roundup/backends/rdbms_common.py

index a60c79d6646f1296bdcaddff6d7292e5826e3847..cd24b8430dbf42144b428841247afb4832f5e3c9 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: rdbms_common.py,v 1.22 2002-10-08 04:11:16 richard Exp $
+# $Id: rdbms_common.py,v 1.23 2002-10-31 04:02:23 richard Exp $
 ''' Relational database (SQL) backend common code.
 
 Basics:
@@ -1767,9 +1767,12 @@ class Class(hyperdb.Class):
                         xtra = ' or _%s is NULL'%k
                     else:
                         xtra = ''
-                    s = ','.join([a for x in v])
-                    where.append('(_%s in (%s)%s)'%(k, s, xtra))
-                    args = args + v
+                    if v:
+                        s = ','.join([a for x in v])
+                        where.append('(_%s in (%s)%s)'%(k, s, xtra))
+                        args = args + v
+                    else:
+                        where.append('_%s is NULL'%k)
                 else:
                     if v == '-1':
                         v = None