forked from mirrors/bookwyrm
avoid error on bad book data in discover page
This commit is contained in:
parent
ae37e5b9d9
commit
cfff75764b
1 changed files with 1 additions and 1 deletions
|
@ -143,7 +143,7 @@ def books_page(request):
|
||||||
if request.user.is_authenticated:
|
if request.user.is_authenticated:
|
||||||
recent_books = models.Edition.objects.filter(
|
recent_books = models.Edition.objects.filter(
|
||||||
~Q(shelfbook__shelf__user=request.user),
|
~Q(shelfbook__shelf__user=request.user),
|
||||||
id__in=[b.id for b in recent_books],
|
id__in=[b.id for b in recent_books if b],
|
||||||
)
|
)
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
|
|
Loading…
Reference in a new issue