2👍
✅
I have figured out what’s wrong and how to fix it now 🙂
- As stated in the Django doc:
Django interprets the first Manager defined in a class as the “default” Manager, and several parts of Django will use that Manager exclusively for that model.
In my case, I should make sure that SortedTagManager
is the first Manager
defined.
2.I should have count notes
instead of users
:
Count('notes', distinct=True)
Source:stackexchange.com