really don't know (but probably to ckeck for nulls)
the complete code is
def BELONGS(self, first, second):
if isinstance(second, str):
return '(%s IN (%s))' % (self.expand(first), second[:-1])
elif second==[] or second==():
return '(1=0)'
items = ','.join(self.expand(item, first.type) for item in second)
return '(%s IN (%s))' % (self.expand(first), items)
Il giorno martedì 6 novembre 2012 18:01:59 UTC+1, Marin Pranjić ha scritto:
>
> Done: http://code.google.com/p/web2py/issues/detail?id=1147
>
>
> Is there a reason for
> elif second==[] or second==()
>
> while it could easily be
> elif not second
> ?
>
> This should fix it.
>
--