mirror of
https://github.com/langgenius/dify.git
synced 2024-11-15 19:22:36 +08:00
Fix: number maybe empty string (#10743)
This commit is contained in:
parent
51db59622c
commit
2fed55ae6b
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue
Block a user