From 92efea224d818120b2e9cc8c7317e920d48de142 Mon Sep 17 00:00:00 2001 From: liuyebo <1515783401@qq.com> Date: Wed, 29 May 2024 12:44:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- photo_review/util/data_util.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/photo_review/util/data_util.py b/photo_review/util/data_util.py index 36f0c5d..e175c7a 100644 --- a/photo_review/util/data_util.py +++ b/photo_review/util/data_util.py @@ -7,6 +7,8 @@ def handle_decimal(string): if not string: return "" string = re.sub(r'[^0-9.]', '', string) + if "." not in string: + return string front, back = string.rsplit('.', 1) front = front.replace(".", "") if back: