X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/9deab73593038a6b11d39f65e3a81c41fc2b13f9..a1ea2966e73e96e9ea5a192320353e8863687b41:/apps/catalogue/views.py?ds=sidebyside diff --git a/apps/catalogue/views.py b/apps/catalogue/views.py index 82ca9fde0..124cd9313 100644 --- a/apps/catalogue/views.py +++ b/apps/catalogue/views.py @@ -433,7 +433,7 @@ def find_best_matches(query, user=None): if isinstance(match, models.Book)) authors = set(match.name.lower() for match in result if isinstance(match, models.Tag) and match.category=='author') - result = (res for res in result if not ( + result = tuple(res for res in result if not ( (isinstance(res, pdcounter_models.BookStub) and res.pretty_title().lower() in book_titles) or (isinstance(res, pdcounter_models.Author) and res.name.lower() in authors) ))