mirror of
https://github.com/django/django.git
synced 2025-12-02 16:16:01 +00:00
Fixed #28497 -- Restored the ability to use sliced QuerySets with __exact.
Regression in ec50937bcb.
Thanks Simon Charette for review.
This commit is contained in:
parent
61a6245dc5
commit
1b73ccc4bf
3 changed files with 39 additions and 0 deletions
|
|
@ -1627,6 +1627,9 @@ class Query:
|
|||
"""Clear any existing limits."""
|
||||
self.low_mark, self.high_mark = 0, None
|
||||
|
||||
def has_limit_one(self):
|
||||
return self.high_mark is not None and (self.high_mark - self.low_mark) == 1
|
||||
|
||||
def can_filter(self):
|
||||
"""
|
||||
Return True if adding filters to this instance is still possible.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue