From 3e687c4b2372284ab0d9f3dfd043c024f9ec8711 Mon Sep 17 00:00:00 2001 From: LmeSzinc Date: Thu, 28 May 2020 07:29:42 +0800 Subject: [PATCH] Fix: campaign_ocr result start with '-' --- module/campaign/campaign_ocr.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module/campaign/campaign_ocr.py b/module/campaign/campaign_ocr.py index 73f9d295f..f36465486 100644 --- a/module/campaign/campaign_ocr.py +++ b/module/campaign/campaign_ocr.py @@ -31,6 +31,8 @@ def ensure_chapter_index(name): def ocr_result_process(result): result = result.lower().replace('--', '-') + if result.startswith('-'): + result = result[1:] if len(result) == 2 and result[0].isdigit(): result = '-'.join(result) return result