diff options
Diffstat (limited to 'django/utils')
| -rw-r--r-- | django/utils/tree.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/django/utils/tree.py b/django/utils/tree.py index cb45c7ee29..302cd37d5f 100644 --- a/django/utils/tree.py +++ b/django/utils/tree.py @@ -5,6 +5,8 @@ ORM. import copy +from django.utils.hashable import make_hashable + class Node: """ @@ -71,10 +73,7 @@ class Node: ) def __hash__(self): - return hash((self.__class__, self.connector, self.negated, *[ - tuple(child) if isinstance(child, list) else child - for child in self.children - ])) + return hash((self.__class__, self.connector, self.negated, *make_hashable(self.children))) def add(self, data, conn_type, squash=True): """ |
