Migration updates

Squash version page migrations.
Add manual OCR and parsing migrations.
Fix tests.
Page search updates.

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
Roberto Rosario
2019-10-09 16:38:00 -04:00
parent d0ee8aba16
commit 7fbb94a8ae
36 changed files with 449 additions and 269 deletions

View File

@@ -246,12 +246,12 @@ class DocumentVersion(models.Model):
return result
@property
def page_count(self):
"""
The number of pages that the document posses.
"""
return self.pages.count()
#@property
#def page_count(self):
# """
# The number of pages that the document posses.
# """
# return self.pages.count()
def revert(self, _user=None):
"""
@@ -326,6 +326,8 @@ class DocumentVersion(models.Model):
sender=Document, instance=self.document
)
self.document.pages_reset(update_page_count=False)
def save_to_file(self, file_object):
"""
Save a copy of the document from the document storage backend