diff options
| author | aspalding <aspalding@procuredhealth.com> | 2018-10-16 10:02:52 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-10-17 11:34:49 -0400 |
| commit | dc5e75d419893bde33b7e439b59bdf271fc1a3f2 (patch) | |
| tree | 4e2eb6a69dba3e382dfb30591f2a2b4a3e5dcc04 /django/utils/tree.py | |
| parent | 217f82d7139fd32f07adbfa92c5fb383d0ade577 (diff) | |
Fixed #29838 -- Fixed crash when combining Q objects with __in lookups and lists.
Regression in fc6528b25ab1834be1a478b405bf8f7ec5cf860c.
Diffstat (limited to 'django/utils/tree.py')
| -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): """ |
