diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2018-08-08 08:51:20 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2018-08-08 08:52:55 +0200 |
| commit | 2bf766cedca413826d599ac190fd6715429616f6 (patch) | |
| tree | 1c586e85bcd8257e55552f7fe562eace255fa20f /django | |
| parent | d46bf119799f4d319f41d890366bc8154017b432 (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.py | 5 |
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): """ |
