mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-26 19:41:11 +00:00
Merge pull request #2437 from cincodenada/fix/list-suggestions
Fix: Slice queryset in list suggestions before we resolve it
This commit is contained in:
commit
2e882a447f
1 changed files with 2 additions and 2 deletions
|
@ -110,8 +110,8 @@ def get_list_suggestions(book_list, user, query=None):
|
|||
s.default_edition
|
||||
for s in models.Work.objects.filter(
|
||||
~Q(editions__in=book_list.books.all()),
|
||||
).order_by("-updated_date")
|
||||
][: 5 - len(suggestions)]
|
||||
).order_by("-updated_date")[: 5 - len(suggestions)]
|
||||
]
|
||||
return suggestions
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue