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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user