Merge branch 'main' into fix/chore-fix

This commit is contained in:
Yeuoly
2024-11-26 18:02:41 +08:00
26 changed files with 509 additions and 123 deletions

View File

@ -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