1👍
If you take a look at the docs for values, you’ll see no guarantee of grouping or distinct. If you want that functionality, you’ll have to call .order_by()
and/or .distinct()
when making you call to the ORM.
That it works at all is probably just a side effect of the SQL generated. If you want to see the SQL, take a look at Django-debug-toolbar
Source:stackexchange.com