Feature: PDF actions - merge, split & rotate (#6094)

This commit is contained in:
shamoon
2024-03-25 18:41:24 -07:00
committed by GitHub
parent 533b6c77a2
commit 17e53dd020
31 changed files with 1847 additions and 150 deletions

View File

@@ -23,7 +23,7 @@ from filelock import FileLock
from guardian.shortcuts import remove_perm
from documents import matching
from documents.caching import clear_metadata_cache
from documents.caching import clear_document_caches
from documents.classifier import DocumentClassifier
from documents.consumer import parse_doc_title_w_placeholders
from documents.file_handling import create_source_path_directory
@@ -439,7 +439,8 @@ def update_filename_and_move_files(sender, instance: Document, **kwargs):
archive_filename=instance.archive_filename,
modified=timezone.now(),
)
clear_metadata_cache(instance.pk)
# Clear any caching for this document. Slightly overkill, but not terrible
clear_document_caches(instance.pk)
except (OSError, DatabaseError, CannotMoveFilesException) as e:
logger.warning(f"Exception during file handling: {e}")