From 2eb35b637feb2e86cfb475527fc9809f78e941c9 Mon Sep 17 00:00:00 2001 From: liuyebo <1515783401@qq.com> Date: Tue, 18 Jun 2024 16:56:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=87=91=E9=A2=9D=E7=B1=BB?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=9A=84=E5=A4=84=E7=90=86=EF=BC=8C=E9=99=90?= =?UTF-8?q?=E5=88=B6=E9=95=BF=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- photo_review/util/data_util.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/photo_review/util/data_util.py b/photo_review/util/data_util.py index a345c51..dab8d85 100644 --- a/photo_review/util/data_util.py +++ b/photo_review/util/data_util.py @@ -8,9 +8,12 @@ def handle_decimal(string): return "" string = re.sub(r'[^0-9.]', '', string) if "." not in string: - return string - front, back = string.rsplit('.', 1) - front = front.replace(".", "") + front = string + back = "" + else: + front, back = string.rsplit('.', 1) + front = front.replace(".", "") + front = front[-16:] if back: back = "." + back