From 2fed55ae6bf07957504d7da26ee3d8f8bc1bd5fb Mon Sep 17 00:00:00 2001 From: crazywoola <100913391+crazywoola@users.noreply.github.com> Date: Fri, 15 Nov 2024 16:31:10 +0800 Subject: [PATCH] Fix: number maybe empty string (#10743) --- api/core/app/apps/base_app_generator.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/core/app/apps/base_app_generator.py b/api/core/app/apps/base_app_generator.py index 6e6da95401..3325e30088 100644 --- a/api/core/app/apps/base_app_generator.py +++ b/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: