Fix: number maybe empty string (#10743)

This commit is contained in:
crazywoola 2024-11-15 16:31:10 +08:00 committed by GitHub
parent 51db59622c
commit 2fed55ae6b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -91,6 +91,9 @@ class BaseAppGenerator:
)
if variable_entity.type == VariableEntityType.NUMBER and isinstance(value, str):
# handle empty string case
if not value.strip():
return None
# may raise ValueError if user_input_value is not a valid number
try:
if "." in value: