Opened 7 years ago
Last modified 6 years ago
#29643 closed Bug
Hashing list in Q objects when using __in lookup — at Initial Version
Description ¶
When using djangorestframework with django 2.0.X with lookup in like idin=[1,2,3] will raise: unhashable type: 'list'
traceback ends to this file:
/django/utils/tree.py" in hash
- 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.