[Answered ]-Operator does not exist: character varying[] = text[] in django?

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)

Leave a comment