From a8ac3f25a01bf3d59772912dcbc03311bb10dfd3 Mon Sep 17 00:00:00 2001
From: Simon Charette <charette.s@gmail.com>
Date: Tue, 22 Jan 2013 05:10:50 -0500
Subject: [PATCH] Fixed #19653 -- Removed Manager.get_empty_query_set.
---
django/db/models/manager.py | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/django/db/models/manager.py b/django/db/models/manager.py
index 816f619..cee2131 100644
a
|
b
|
class Manager(object):
|
112 | 112 | # PROXIES TO QUERYSET # |
113 | 113 | ####################### |
114 | 114 | |
115 | | def get_empty_query_set(self): |
116 | | return QuerySet(self.model, using=self._db).none() |
117 | | |
118 | 115 | def get_query_set(self): |
119 | 116 | """Returns a new QuerySet object. Subclasses can override this method |
120 | 117 | to easily customize the behavior of the Manager. |
… |
… |
class Manager(object):
|
122 | 119 | return QuerySet(self.model, using=self._db) |
123 | 120 | |
124 | 121 | def none(self): |
125 | | return self.get_empty_query_set() |
| 122 | return self.get_query_set().none() |
126 | 123 | |
127 | 124 | def all(self): |
128 | 125 | return self.get_query_set() |
… |
… |
class EmptyManager(Manager):
|
266 | 263 | self.model = model |
267 | 264 | |
268 | 265 | def get_query_set(self): |
269 | | return self.get_empty_query_set() |
| 266 | return super(EmptyManager, self).get_query_set().none() |