use QuerySet in all managers
This commit is contained in:
parent
0e55faca0d
commit
5b72a33a95
7 changed files with 10 additions and 7 deletions
|
|
@ -40,7 +40,7 @@ def _order_query(qs, sort):
|
|||
if key == 'subscribers':
|
||||
qs = qs.annotate(subscribers=Sum('subscribed_users'))
|
||||
if order_by:
|
||||
qs = qs.order_by(*order_by)
|
||||
qs = qs.order_by(*order_by, nulls_last=True)
|
||||
qs = qs.distinct()
|
||||
return qs
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue