Add missing table name in SQL clause to remove ambiguity

This commit is contained in:
Cédric Krier committed 2008-11-25 18:23:35 +01:00
1 parent 794e000791
commit a8688bfc16
1 file changed
+7 -5
+7 -5
View File
@@ -2683,14 +2683,16 @@ class ORM(object):
_symbol_set[0]] * len(arg[2]))))
if todel:
if arg[1] == 'in':
qu1[-1] = '(' + qu1[-1] + ' or ' \
+ arg[0] + ' is null)'
qu1[-1] = '(' + qu1[-1] + ' OR ' \
'%s.%s IS NULL)' % \
(table._table, arg[0])
else:
qu1[-1] = '(' + qu1[-1] + ' or ' \
+ arg[0] + ' is not null)'
qu1[-1] = '(' + qu1[-1] + ' OR ' \
'%s.%s IS NOT NULL)' % \
(table._table, arg[0])
qu2 += arg[2]
elif todel:
qu1.append('(' + arg[0] + ' IS NULL)')
qu1.append('(%s.%s IS NULL)' % (table._table, arg[0]))
else:
if arg[1] == 'in':
qu1.append(' false')