From 5853bf9f407bf5b196e019ac8a4751b4e68cfbdb Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Wed, 12 Apr 2023 21:42:17 +0200 Subject: [PATCH] app.show_media_thumb: Explain why only sending 404 on invalid element --- server/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/app.py b/server/app.py index 424d1f3..cf1be70 100644 --- a/server/app.py +++ b/server/app.py @@ -628,7 +628,7 @@ def show_media(media_id: int) -> ResponseReturnValue: def show_media_thumb(media_id: int) -> ResponseReturnValue: element: MediaElement = MediaElement.get(id=media_id) if element is None: - # TODO add default thumbnail if not found + # do send only 404 (not default thumbnail) as element does not exist (so cannot even have default) return make_response(f"Not found", 404) if element.thumbnail is None: return redirect("/static/thumbnail_missing.webp")