| if obj is None: | if obj is None: | ||||
| return None | return None | ||||
| from models.model import App, IconType | |||||
| from models.model import App, IconType, Site | |||||
| if isinstance(obj, dict) and "app" in obj: | if isinstance(obj, dict) and "app" in obj: | ||||
| obj = obj["app"] | 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 file_helpers.get_signed_file_url(obj.icon) | ||||
| return None | return None | ||||