From 3ab55c1a8a58ae6d6791cafbcefaf224d01ff314 Mon Sep 17 00:00:00 2001 From: Reto Aebersold Date: Tue, 4 Oct 2016 05:44:19 -0600 Subject: Fixed #27309 -- Added CallableBool.__hash__(). --- django/utils/deprecation.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'django/utils') diff --git a/django/utils/deprecation.py b/django/utils/deprecation.py index 6fc27a8edd..ce3c90aa77 100644 --- a/django/utils/deprecation.py +++ b/django/utils/deprecation.py @@ -119,6 +119,9 @@ class CallableBool: def __or__(self, other): return bool(self.value or other) + def __hash__(self): + return hash(self.value) + CallableFalse = CallableBool(False) CallableTrue = CallableBool(True) -- cgit v1.3