From f1435018ecb6e4bf2c8877d5745a3e3525ebef82 Mon Sep 17 00:00:00 2001 From: Thomas Stallinger Date: Fri, 9 Oct 2026 11:12:11 +0200 Subject: [PATCH] Webapp-Icons: Content-Type auch fuer Vorlagen-Icons nachschlagen get_webapp_icon kannte nur workspace_webapps/gruppen_webapps, Icons von webapp_templates kamen als application/octet-stream. Co-Authored-By: Claude Opus 5.5 --- app.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index 6f9a17a..9145bb0 100644 --- a/app.py +++ b/app.py @@ -5090,11 +5090,15 @@ def get_webapp_icon(filename: str): SELECT icon_content_type FROM workspace_webapps WHERE icon_filename = %s UNION ALL SELECT icon_content_type FROM gruppen_webapps WHERE icon_filename = %s + UNION ALL + SELECT icon_content_type FROM webapp_templates WHERE icon_filename = %s LIMIT 1 """, - (safe_name, safe_name), + (safe_name, safe_name, safe_name), ) row = cur.fetchone() + # Vorlagen-Icons fehlten hier bis 09.10.2026 und kamen als + # application/octet-stream. media_type = row[0] if row and row[0] else "application/octet-stream" return FileResponse(file_path, media_type=media_type)