Skip to content

Commit 01f1164

Browse files
committed
fix: fix EmptyResult raise
1 parent c08e5c6 commit 01f1164

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clickhouse_backend/models/sql/compiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def as_sql(self, with_limits=True, with_col_aliases=False):
148148
self.compile(self.where) if self.where is not None else ("", [])
149149
)
150150
except EmptyResultSet:
151-
if compat.dj_ge42 and self.elide_empty:
151+
if compat.dj3 or self.elide_empty:
152152
raise
153153
# Use a predicate that's always False.
154154
where, w_params = "FALSE", []

0 commit comments

Comments
 (0)