From 09397f5cfade93c2e79a391ded7ab6b01e51730e Mon Sep 17 00:00:00 2001 From: Simon Charette Date: Fri, 28 Oct 2022 08:45:28 +0200 Subject: [PATCH] Used Query.is_sliced in SQLCompiler.as_sql(). --- django/db/models/sql/compiler.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/django/db/models/sql/compiler.py b/django/db/models/sql/compiler.py index 3097500be4f..8d6b6678286 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: