mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-12 00:58:57 +08:00
fix: site icon not showing (#11094)
This commit is contained in:
parent
17ee731546
commit
0f85e3557b
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user