Skip to content

Commit

Permalink
Used Query.is_sliced in SQLCompiler.as_sql().
Browse files Browse the repository at this point in the history
  • Loading branch information
charettes authored and felixxm committed Oct 28, 2022
1 parent de2c212 commit 09397f5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions django/db/models/sql/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -716,9 +716,7 @@ def as_sql(self, with_limits=True, with_col_aliases=False):
)
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:
Expand Down

0 comments on commit 09397f5

Please sign in to comment.