From 4f20333ff885c769876ce22c6f079693a6470e17 Mon Sep 17 00:00:00 2001 From: Kurbanov Bulat Date: Wed, 9 Feb 2022 14:37:37 +0300 Subject: [PATCH] Fix cache fail --- src/app/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/views.py b/src/app/views.py index deb3b62..924a75e 100644 --- a/src/app/views.py +++ b/src/app/views.py @@ -49,7 +49,7 @@ async def download_cached_file(object_id: int, object_type: str): cached_file = await cache_file_by_book_id({}, object_id, object_type) if not cached_file: - raise HTTPException(status_code=status.HTTP_404_NOT_FOUND) + raise HTTPException(status_code=status.HTTP_204_NO_CONTENT) cache_data = cached_file.data