Surround exclude expression with parenthesis
Closes #13576 (grafted from e3ad47f562e5a8b03d4ff01014c83944c9dbd9ce) --HG-- branch : 7.0
This commit is contained in:
@@ -137,7 +137,13 @@ class Exclude(Constraint):
|
||||
return self._where
|
||||
|
||||
def __str__(self):
|
||||
exclude = ', '.join('%s WITH %s' % (column, operator._operator)
|
||||
def format_(element):
|
||||
if isinstance(element, Column):
|
||||
return element
|
||||
else:
|
||||
return '(%s)' % element
|
||||
exclude = ', '.join(
|
||||
'%s WITH %s' % (format_(column), operator._operator)
|
||||
for column, operator in self.excludes)
|
||||
where = ''
|
||||
if self.where:
|
||||
|
||||
Reference in New Issue
Block a user