mirror of
https://github.com/langgenius/dify.git
synced 2025-12-25 10:01:31 -05:00
Fix: number maybe empty string (#10743)
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user