mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 03:32:23 +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):
|
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
|
# may raise ValueError if user_input_value is not a valid number
|
||||||
try:
|
try:
|
||||||
if "." in value:
|
if "." in value:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user