summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorReto Aebersold <aeby@substyle.ch>2016-10-04 05:44:19 -0600
committerTim Graham <timograham@gmail.com>2016-10-04 07:44:19 -0400
commit3ab55c1a8a58ae6d6791cafbcefaf224d01ff314 (patch)
tree855eab122603b045e7de006de3f9bb7bb65d3416 /django
parentfe1aee6b98d2a94ecc983463938135d192ef9afc (diff)
Fixed #27309 -- Added CallableBool.__hash__().
Diffstat (limited to 'django')
-rw-r--r--django/utils/deprecation.py3
1 files changed, 3 insertions, 0 deletions
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)