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 <noreply@anthropic.com>
This commit is contained in:
adminandClaude Opus 5.5 committed 2026-10-09 11:12:11 +02:00
1 parent 41ad31c900
commit f1435018ec
1 file changed
+5 -1
+5 -1
View File
@@ -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)