feat: Check and compare the DSL version before import an app (#10969)
Co-authored-by: Yi <yxiaoisme@gmail.com>
This commit is contained in:
parent
d9579f418d
commit
5172f0bf39
24 changed files with 1101 additions and 874 deletions
|
|
@ -31,9 +31,12 @@ class AppIconUrlField(fields.Raw):
|
|||
if obj is None:
|
||||
return None
|
||||
|
||||
from models.model import IconType
|
||||
from models.model import App, IconType
|
||||
|
||||
if obj.icon_type == IconType.IMAGE.value:
|
||||
if isinstance(obj, dict) and "app" in obj:
|
||||
obj = obj["app"]
|
||||
|
||||
if isinstance(obj, App) and obj.icon_type == IconType.IMAGE.value:
|
||||
return file_helpers.get_signed_file_url(obj.icon)
|
||||
return None
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue