X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/d2b0cc75d0835ad5384bec638fea6ea244eadb40..907aba88951334676a259dccc8f7edd8934d5e00:/src/search/views.py 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