forked from mirrors/bookwyrm
Merge pull request #2033 from bookwyrm-social/author-sort
Reverts author view changes
This commit is contained in:
commit
ef4e06ad52
1 changed files with 2 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
|||
""" the good people stuff! the authors! """
|
||||
from django.contrib.auth.decorators import login_required, permission_required
|
||||
from django.core.paginator import Paginator
|
||||
from django.db.models import Avg, Q
|
||||
from django.db.models import Q
|
||||
from django.shortcuts import get_object_or_404, redirect
|
||||
from django.template.response import TemplateResponse
|
||||
from django.utils.decorators import method_decorator
|
||||
|
@ -28,8 +28,7 @@ class Author(View):
|
|||
|
||||
books = (
|
||||
models.Work.objects.filter(Q(authors=author) | Q(editions__authors=author))
|
||||
.annotate(Avg("editions__review__rating"))
|
||||
.order_by("editions__review__rating__avg")
|
||||
.order_by("created_date")
|
||||
.distinct()
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue