Load the converter class on demand

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2019-04-27 02:47:23 -04:00
parent 3fa08debe9
commit 799d47054e
9 changed files with 30 additions and 22 deletions
+2 -2
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)