Cleanup OCR app code and link registration

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
Roberto Rosario
2019-09-24 15:37:18 -04:00
parent d7818b64b0
commit b03758ed8b
4 changed files with 20 additions and 11 deletions

View File

@@ -22,7 +22,7 @@ logger = logging.getLogger(__name__)
class DocumentPageOCRContentManager(models.Manager):
def delete_ocr_content_for(self, document, user=None):
def delete_content_for(self, document, user=None):
with transaction.atomic():
for document_page in document.pages.all():
self.filter(document_page=document_page).delete()