From 8dad6520729d26d90ebee48939d7f2a1fd73dd38 Mon Sep 17 00:00:00 2001 From: Samo Penic <samo.penic@gmail.com> Date: Thu, 24 Jan 2019 15:24:06 +0000 Subject: [PATCH] Fix in pages that don't have qr code --- aoi_ocr/Ocr.py | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/aoi_ocr/Ocr.py b/aoi_ocr/Ocr.py index 99ad414..c064e76 100644 --- a/aoi_ocr/Ocr.py +++ b/aoi_ocr/Ocr.py @@ -290,6 +290,8 @@ def get_paper_ocr_data(self): data = self.get_code_data() + if self.QRData is None: + return None data["qr"] = bytes.decode(self.QRData, 'utf8') data["errors"] = self.errors data["warnings"] = self.warnings -- Gitblit v1.9.3