1👍
Your field colors
is text[]
, the array of strings. You are trying to use IN
operator with a list of strings as a parameter. That obviously wouldn’t work since elements of text[]
is text
.
You probably want to filter all products that overlap with given colors. If so, you should use overlap
operator:
products = Product.objects.filter(colors__overlap=l)
Source:stackexchange.com