Answer the question
In order to leave comments, you need to log in
How to prevent Django from returning fields with the same values in a queryset?
When using the distinct method, it throws an error:
DISTINCT ON fields is not supported by this database backend
Answer the question
In order to leave comments, you need to log in
>DISTINCT ON fields is not supported by this database backend
Well, the normal way, as you indicated, does not work.
Then either change the query itself so that it does not return duplicate values, or get records along with duplicates and leave only unique ones using pion.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question