diff --git a/web_interface/blueprints/api_v3.py b/web_interface/blueprints/api_v3.py index d47a1cc8..d278312a 100644 --- a/web_interface/blueprints/api_v3.py +++ b/web_interface/blueprints/api_v3.py @@ -3709,13 +3709,14 @@ def _parse_form_value_with_schema(value, key_path, schema): except ValueError: return prop.get('default', 0.0) - # Try parsing as number (fallback) - try: - if '.' in stripped: - return float(stripped) - return int(stripped) - except ValueError: - pass + # Try parsing as number (fallback) — skip when schema explicitly says string + if not (prop and prop.get('type') == 'string'): + try: + if '.' in stripped: + return float(stripped) + return int(stripped) + except ValueError: + pass # Return as string return value