fix: fix object value is optional should skip validate (#30894)

This commit is contained in:
wangxiaolei 2026-01-13 15:21:06 +08:00 committed by GitHub
parent 9be863fefa
commit 2d53ba8671
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -189,7 +189,7 @@ class BaseAppGenerator:
elif value == 0:
value = False
case VariableEntityType.JSON_OBJECT:
if not isinstance(value, dict):
if value and not isinstance(value, dict):
raise ValueError(f"{variable_entity.variable} in input form must be a dict")
case _:
raise AssertionError("this statement should be unreachable.")