Opened 7 years ago
Last modified 6 years ago
#29643 closed Bug
Hashing list in Q objects when using __in lookup — at Version 1
Description (last modified by ) ¶
When using djangorestframework with django 2.0.X with lookup _in like id__in=[1,2,3]
will raise: unhashable type: 'list'
traceback ends to this file:
/django/utils/tree.py" in __hash__ 74. return hash((self.__class__, self.connector, self.negated) + tuple(self.children))
When using tuples with __in
everything works fine. But when using .values_list() on query I need to use tuple(query) to use it in Q object with __in
lookup.
Code worked before with 1.11 version just fine. Also when using _in without Q() everything seems to work just fine.
Note:
See TracTickets
for help on using tickets.