1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #29838 -- Fixed crash when combining Q objects with __in lookups and lists.

Regression in fc6528b25a.
This commit is contained in:
aspalding
2018-10-16 10:02:52 -05:00
committed by Tim Graham
parent 217f82d713
commit dc5e75d419
3 changed files with 9 additions and 6 deletions

View File

@@ -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):
"""