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