summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2018-08-08 08:51:20 +0200
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2018-08-08 08:52:55 +0200
commit2bf766cedca413826d599ac190fd6715429616f6 (patch)
tree1c586e85bcd8257e55552f7fe562eace255fa20f /django
parentd46bf119799f4d319f41d890366bc8154017b432 (diff)
[2.1.x] Fixed #29643 -- Fixed crash when combining Q objects with __in lookups and lists.
Regression in fc6528b25ab1834be1a478b405bf8f7ec5cf860c. Backport of 9fee229874367beafd532dad6d0f9ff9676ded0b from master
Diffstat (limited to 'django')
-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):
"""