fixed issue 1147, belongs(None), thanks Marin
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.2.1 (2012-11-06 10:36:39) stable
|
Version 2.2.1 (2012-11-06 14:26:21) stable
|
||||||
|
|||||||
+1
-1
@@ -1199,7 +1199,7 @@ class BaseAdapter(ConnectionPool):
|
|||||||
def BELONGS(self, first, second):
|
def BELONGS(self, first, second):
|
||||||
if isinstance(second, str):
|
if isinstance(second, str):
|
||||||
return '(%s IN (%s))' % (self.expand(first), second[:-1])
|
return '(%s IN (%s))' % (self.expand(first), second[:-1])
|
||||||
elif second==[] or second==():
|
elif not second:
|
||||||
return '(1=0)'
|
return '(1=0)'
|
||||||
items = ','.join(self.expand(item, first.type) for item in second)
|
items = ','.join(self.expand(item, first.type) for item in second)
|
||||||
return '(%s IN (%s))' % (self.expand(first), items)
|
return '(%s IN (%s))' % (self.expand(first), items)
|
||||||
|
|||||||
Reference in New Issue
Block a user