mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-29 04:51:11 +00:00
Use a simpler query for books to show on the landing page
This commit is contained in:
parent
3545a1c3b6
commit
3f08d6d8c4
1 changed files with 2 additions and 8 deletions
|
@ -71,14 +71,8 @@ def get_landing_books():
|
||||||
"""list of books for the landing page"""
|
"""list of books for the landing page"""
|
||||||
return list(
|
return list(
|
||||||
set(
|
set(
|
||||||
models.Edition.objects.filter(
|
models.Edition.objects.exclude(cover__exact="")
|
||||||
review__published_date__isnull=False,
|
|
||||||
review__deleted=False,
|
|
||||||
review__user__local=True,
|
|
||||||
review__privacy__in=["public", "unlisted"],
|
|
||||||
)
|
|
||||||
.exclude(cover__exact="")
|
|
||||||
.distinct()
|
.distinct()
|
||||||
.order_by("-review__published_date")[:6]
|
.order_by("-updated_date")[:6]
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue