Pārlūkot izejas kodu

fix: site icon not showing (#11094)

tags/0.12.1
Hash Brown pirms 11 mēnešiem
vecāks
revīzija
0f85e3557b
Revīzijas autora e-pasta adrese nav piesaistīta nevienam kontam
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2
    2
      api/libs/helper.py

+ 2
- 2
api/libs/helper.py Parādīt failu

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


Notiek ielāde…
Atcelt
Saglabāt