mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-12 19:49:04 +08:00
fix(app_dsl_service): handle missing app mode with a ValueError (#11945)
Signed-off-by: -LAN- <laipz8200@outlook.com>
This commit is contained in:
parent
3d07a94bd7
commit
2ad2a402fb
@ -340,7 +340,10 @@ class AppDslService:
|
|||||||
) -> App:
|
) -> App:
|
||||||
"""Create a new app or update an existing one."""
|
"""Create a new app or update an existing one."""
|
||||||
app_data = data.get("app", {})
|
app_data = data.get("app", {})
|
||||||
app_mode = AppMode(app_data["mode"])
|
app_mode = app_data.get("mode")
|
||||||
|
if not app_mode:
|
||||||
|
raise ValueError("loss app mode")
|
||||||
|
app_mode = AppMode(app_mode)
|
||||||
|
|
||||||
# Set icon type
|
# Set icon type
|
||||||
icon_type_value = icon_type or app_data.get("icon_type")
|
icon_type_value = icon_type or app_data.get("icon_type")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user