mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
Check-in rules: Do not use empty lists in SQL converted query
This commit is contained in:
@@ -74,7 +74,11 @@ class InList(Func):
|
||||
raise TypeError(f'Dynamic right-hand-site currently not implemented, found {type(self.source_expressions[1])}')
|
||||
rhs, rhs_params = ['%s' for _ in self.source_expressions[1].value], [d for d in self.source_expressions[1].value]
|
||||
|
||||
return '%s IN (%s)' % (lhs, ', '.join(rhs)), lhs_params + rhs_params
|
||||
if rhs:
|
||||
return '%s IN (%s)' % (lhs, ', '.join(rhs)), lhs_params + rhs_params
|
||||
else:
|
||||
# "IN ()" is not considered valid SQL by PostgreSQL (unlike SQLite)
|
||||
return 'FALSE', []
|
||||
|
||||
|
||||
def tolerance(b, tol=None, sign=1):
|
||||
|
||||
Reference in New Issue
Block a user