summaryrefslogtreecommitdiff
path: root/django/utils
diff options
context:
space:
mode:
Diffstat (limited to 'django/utils')
-rw-r--r--django/utils/tree.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/django/utils/tree.py b/django/utils/tree.py
index 2a188acda7..421ad5cd3c 100644
--- a/django/utils/tree.py
+++ b/django/utils/tree.py
@@ -71,7 +71,10 @@ class Node:
)
def __hash__(self):
- return hash((self.__class__, self.connector, self.negated) + tuple(self.children))
+ return hash((self.__class__, self.connector, self.negated) + tuple([
+ tuple(child) if isinstance(child, list) else child
+ for child in self.children
+ ]))
def add(self, data, conn_type, squash=True):
"""