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:
@@ -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):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user