Don't error out when the document has no versions. Record
the document version's document as the action object. Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
@@ -47,7 +47,10 @@ class DocumentPageOCRContentManager(models.Manager):
|
||||
)
|
||||
document_version.ocr_errors.all().delete()
|
||||
|
||||
event_ocr_document_version_finish.commit(target=document_version)
|
||||
event_ocr_document_version_finish.commit(
|
||||
action_object=document_version.document,
|
||||
target=document_version
|
||||
)
|
||||
|
||||
post_document_version_ocr.send(
|
||||
sender=document_version.__class__, instance=document_version
|
||||
|
||||
Reference in New Issue
Block a user