-
We had the following field definition:
it worked correctly until last django-filter release. Now it's broken. Removing |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
#1054 changed this. I don't think MyModel.objects.filter(Q(field='value1') | Q(field='value2')) The PR changed this so lookup expressions are accounted for, so you could queries like MyModel.objects.filter(Q(field__contains='value1') | Q(field__contains='value2')) However, in your case, the |
Beta Was this translation helpful? Give feedback.
#1054 changed this. I don't think
lookup_expr
was previously used, and by default, Q objects are OR'ed together, so the result looks like it was performing anin
lookup. e.g.,The PR changed this so lookup expressions are accounted for, so you could queries like
However, in your case, the
in
lookup expects a list of values, which is why you get an error. It should be safe to droplookup_expr='in'