summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-10-08 08:43:31 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2008-10-08 08:43:31 +0000
commit09d84c4d40d1d9796f1d0f52bc3ea1bb93a68435 (patch)
tree4948950d9e2ffd7603afd80b5890e8d65070e551 /django
parent318c1c32dd6e595600e217fbcf92aa879209e7d7 (diff)
[1.0.X] Applying a limit to a queryset that already had an upper limit of 0
wasn't working properly. Backport of r9201 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9204 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
-rw-r--r--django/db/models/sql/query.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py
index bf3b63f100..9ac0d0c960 100644
--- a/django/db/models/sql/query.py
+++ b/django/db/models/sql/query.py
@@ -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