Browse Source

Fix: number maybe empty string (#10743)

crazywoola 5 months ago
parent
commit
2fed55ae6b
1 changed files with 3 additions and 0 deletions
  1. 3 0
      api/core/app/apps/base_app_generator.py

+ 3 - 0
api/core/app/apps/base_app_generator.py

@@ -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: