From 079c06c20789d85b646730c52e3505180c4dfa46 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Sat, 19 Sep 2015 22:07:52 -0400 Subject: [PATCH] Don't reference document_version in error messages as if might not exists yet. --- mayan/apps/ocr/tasks.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mayan/apps/ocr/tasks.py b/mayan/apps/ocr/tasks.py index 0980faab79..485c28b447 100644 --- a/mayan/apps/ocr/tasks.py +++ b/mayan/apps/ocr/tasks.py @@ -38,13 +38,13 @@ def task_do_ocr(self, document_version_pk): TextExtractor.process_document_version(document_version) except OperationalError as exception: logger.warning( - 'OCR error for document version: %s; %s. Retrying.', - document_version, exception + 'OCR error for document version: %d; %s. Retrying.', + document_version_pk, exception ) raise self.retry(exc=exception) except Exception as exception: logger.error( - 'OCR error for document version: %s; %s', document_version, + 'OCR error for document version: %d; %s', document_version_pk, exception ) if document_version: