From: Radek Czajka Date: Fri, 18 Sep 2020 13:19:23 +0000 (+0200) Subject: Fixes #4080: Missing search no-results page. X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/9891ea5fbf1f70686612a66fcb6bdfc04a9a037c?ds=sidebyside Fixes #4080: Missing search no-results page. --- diff --git a/src/search/views.py b/src/search/views.py index 4d792e439..970734ad7 100644 --- a/src/search/views.py +++ b/src/search/views.py @@ -179,7 +179,7 @@ def search_books(query): except Book.DoesNotExist: return False - results = filter(ensure_exists, results) + results = [r for r in results if ensure_exists(r)] return results @@ -214,7 +214,7 @@ def search_pictures(query): except Picture.DoesNotExist: return False - results = filter(ensure_exists, results) + results = [r for r in results if ensure_exists(r)] return results