mirror of
https://github.com/django/django.git
synced 2025-10-26 23:26:08 +00:00
Applying a limit to a queryset that already had an upper limit of 0 wasn't
working properly. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9201 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -1491,12 +1491,12 @@ class Query(object):
|
||||
clamped to any existing high value.
|
||||
"""
|
||||
if high is not None:
|
||||
if self.high_mark:
|
||||
if self.high_mark is not None:
|
||||
self.high_mark = min(self.high_mark, self.low_mark + high)
|
||||
else:
|
||||
self.high_mark = self.low_mark + high
|
||||
if low is not None:
|
||||
if self.high_mark:
|
||||
if self.high_mark is not None:
|
||||
self.low_mark = min(self.high_mark, self.low_mark + low)
|
||||
else:
|
||||
self.low_mark = self.low_mark + low
|
||||
|
||||
Reference in New Issue
Block a user