From 192d1eb5c3691cd7bb6e5f9caaaf5bb00c60664e Mon Sep 17 00:00:00 2001 From: Sergey Fedoseev Date: Thu, 10 Dec 2015 15:42:25 +0500 Subject: [1.9.x] Fixed #25894 -- Fixed evaluation of zero-length slices of QuerySet.values(). Backport of 69b69f6d6085d80ccf36a3e999e9e5b98d580786 from master --- django/db/models/sql/compiler.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'django/db/models/sql') diff --git a/django/db/models/sql/compiler.py b/django/db/models/sql/compiler.py index 90121bdb37..ed07eaff10 100644 --- a/django/db/models/sql/compiler.py +++ b/django/db/models/sql/compiler.py @@ -376,8 +376,6 @@ class SQLCompiler(object): If 'with_limits' is False, any limit/offset information is not included in the query. """ - if with_limits and self.query.low_mark == self.query.high_mark: - return '', () self.subquery = subquery refcounts_before = self.query.alias_refcount.copy() try: -- cgit v1.3