From d128775b89b80775e437d7664bc9d9e627bead33 Mon Sep 17 00:00:00 2001 From: czajkub Date: Mon, 25 Aug 2025 18:51:36 +0200 Subject: [PATCH] resolves #7 --- scripts/xml2es.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/xml2es.py b/scripts/xml2es.py index 81f8d64..16e278c 100644 --- a/scripts/xml2es.py +++ b/scripts/xml2es.py @@ -24,12 +24,12 @@ def convert_str2datetime(date_str: str) -> str: return date_str # fallback to original if parsing fails @staticmethod - def convert_str2float(value_str: str) -> float: + def convert_str2float(value_str: str) -> float | str: """Convert value string to numeric type (float).""" try: return float(value_str) except (ValueError, TypeError): - return 0.0 # fallback to 0 if parsing fails + return value_str # fallback to original if parsing fails def parse_xml(self) -> Generator[dict[str, Any], None, None]: """