You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue arises when using a reference to a non-pickleable type of object, such as dict_keys, in a Q object.
This causes the | operator to fail, as the Q object cannot be properly serialized and deserialized.
The example provided demonstrates that Q(x__in={}.keys()) works, but Q() | Q(x__in={}.keys()) raises a TypeError due to the non-pickleable dict_keys object.
While a workaround is to use Q(x__in={}) instead, it would be desirable for the Q object to support pickleable types, such as lists or tuples, to avoid this issue.
The text was updated successfully, but these errors were encountered:
dict_keys
, in aQ
object.|
operator to fail, as theQ
object cannot be properly serialized and deserialized.Q(x__in={}.keys())
works, butQ() | Q(x__in={}.keys())
raises aTypeError
due to the non-pickleabledict_keys
object.Q(x__in={})
instead, it would be desirable for theQ
object to support pickleable types, such as lists or tuples, to avoid this issue.The text was updated successfully, but these errors were encountered: