1
0
mirror of https://github.com/django/django.git synced 2025-10-30 17:16:10 +00:00

[1.8.x] Fixed #24940 -- Made model managers hashable

Thanks Federico Jaramillo Martínez for the report and Tim Graham for the
test and review.

Backport of d3d66d4722 from master
This commit is contained in:
Markus Holtermann
2015-06-18 21:57:08 +02:00
parent aa00f48280
commit f64a3de2d4
4 changed files with 21 additions and 2 deletions

View File

@@ -236,6 +236,9 @@ class BaseManager(object):
def __ne__(self, other):
return not (self == other)
def __hash__(self):
return id(self)
class Manager(BaseManager.from_queryset(QuerySet)):
pass