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: