Surround exclude expression with parenthesis

Closes #13576
This commit is contained in:
Cédric Krier committed 2024-10-09 17:19:44 +02:00
1 parent ca61f7cc7b
commit f64e38f799
1 file changed
+7 -1
+7 -1
View File
@@ -139,7 +139,13 @@ class Exclude(Constraint):
return self._where
def __str__(self, using=''):
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: