summaryrefslogtreecommitdiff
path: root/django/utils/tree.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/utils/tree.py')
-rw-r--r--django/utils/tree.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/django/utils/tree.py b/django/utils/tree.py
index 392838b482..b7f7b9798b 100644
--- a/django/utils/tree.py
+++ b/django/utils/tree.py
@@ -70,6 +70,9 @@ class Node:
self.children == other.children
)
+ def __hash__(self):
+ return hash((self.__class__, self.connector, self.negated) + tuple(self.children))
+
def add(self, data, conn_type, squash=True):
"""
Combine this tree and the data represented by data using the