summaryrefslogtreecommitdiff
path: root/django/db/models/sql/compiler.py
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2022-10-28 08:45:28 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-10-28 08:46:33 +0200
commit09397f5cfade93c2e79a391ded7ab6b01e51730e (patch)
tree6a09629198e9d8cbcf226c0afda52159f0f63b86 /django/db/models/sql/compiler.py
parentde2c2127b66e77a034c01c81753c5c08e651a5b4 (diff)
downloaddjango-09397f5cfade93c2e79a391ded7ab6b01e51730e.tar.gz
Used Query.is_sliced in SQLCompiler.as_sql().
Diffstat (limited to 'django/db/models/sql/compiler.py')
-rw-r--r--django/db/models/sql/compiler.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/django/db/models/sql/compiler.py b/django/db/models/sql/compiler.py
index 3097500be4..8d6b667828 100644
--- a/django/db/models/sql/compiler.py
+++ b/django/db/models/sql/compiler.py
@@ -716,9 +716,7 @@ class SQLCompiler:
)
for_update_part = None
# Is a LIMIT/OFFSET clause needed?
- with_limit_offset = with_limits and (
- self.query.high_mark is not None or self.query.low_mark
- )
+ with_limit_offset = with_limits and self.query.is_sliced
combinator = self.query.combinator
features = self.connection.features
if combinator: