From 9fee229874367beafd532dad6d0f9ff9676ded0b Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Wed, 8 Aug 2018 08:51:20 +0200 Subject: Fixed #29643 -- Fixed crash when combining Q objects with __in lookups and lists. Regression in fc6528b25ab1834be1a478b405bf8f7ec5cf860c. --- django/utils/tree.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'django/utils') 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): """ -- cgit v1.3