Fix tests
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
@@ -2,6 +2,7 @@ from __future__ import unicode_literals
|
||||
|
||||
from datetime import timedelta
|
||||
|
||||
from django.apps import apps
|
||||
from django.utils.timezone import now
|
||||
|
||||
from mayan.apps.common.settings import settings_db_sync_task_delay
|
||||
@@ -17,6 +18,17 @@ def method_document_ocr_submit(self):
|
||||
latest_version.submit_for_ocr()
|
||||
|
||||
|
||||
def method_document_page_get_ocr_content(self):
|
||||
DocumentVersionPageOCRContent = apps.get_model(
|
||||
app_label='ocr', model_name='DocumentVersionPageOCRContent'
|
||||
)
|
||||
|
||||
try:
|
||||
return self.content_object.ocr_content.content
|
||||
except (AttributeError, DocumentVersionPageOCRContent.DoesNotExist):
|
||||
return None
|
||||
|
||||
|
||||
def method_document_version_ocr_submit(self):
|
||||
event_ocr_document_version_submit.commit(
|
||||
action_object=self.document, target=self
|
||||
|
||||
Reference in New Issue
Block a user