Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: site icon not showing (#11094)

Hash Brown0f85e3557ba1
diff --git a/api/libs/helper.py b/api/libs/helper.py
index 023240a9a4d..b98a4829e8b 100644
--- a/api/libs/helper.py
+++ b/api/libs/helper.py
@@ -31,12 +31,12 @@ class AppIconUrlField(fields.Raw):
if obj is None:
return None
- from models.model import App, IconType
+ from models.model import App, IconType, Site
if isinstance(obj, dict) and "app" in obj:
obj = obj["app"]
- if isinstance(obj, App) and obj.icon_type == IconType.IMAGE.value:
+ if isinstance(obj, App | Site) and obj.icon_type == IconType.IMAGE.value:
return file_helpers.get_signed_file_url(obj.icon)
return None