Load the converter class on demand

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
This commit is contained in:
Roberto Rosario
2019-02-01 04:20:47 -04:00
parent 5b6a6bccb2
commit 4376d76c8a
4 changed files with 14 additions and 11 deletions

View File

@@ -1,6 +1,6 @@
from __future__ import unicode_literals
from mayan.apps.converter import converter_class
from mayan.apps.converter.utils import get_converter_class
class OCRBackendBase(object):
@@ -10,7 +10,7 @@ class OCRBackendBase(object):
if not transformations:
transformations = []
self.converter = converter_class(file_object=file_object)
self.converter = get_converter_class()(file_object=file_object)
for transformation in transformations:
self.converter.transform(transformation=transformation)