summaryrefslogtreecommitdiff
path: root/django/db/models/sql/query.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/db/models/sql/query.py')
-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 ac100c06e5..0f7c1b1d8a 100644
--- a/django/db/models/sql/query.py
+++ b/django/db/models/sql/query.py
@@ -345,7 +345,7 @@ class BaseQuery(object):
# in SQL (in variants that provide them) doesn't change the COUNT
# output.
number = max(0, number - self.low_mark)
- if self.high_mark:
+ if self.high_mark is not None:
number = min(number, self.high_mark - self.low_mark)
return number
@@ -1760,7 +1760,7 @@ class BaseQuery(object):
Typically, this means no limits or offsets have been put on the results.
"""
- return not (self.low_mark or self.high_mark)
+ return not self.low_mark and self.high_mark is None
def clear_select_fields(self):
"""