test cases for #67

This commit is contained in:
jonaswinkler committed 2020-11-29 15:47:56 +01:00
1 parent a27daaebe9
commit 023aeea7ea
5 files changed
+43 -18

No files matched your search

+3 -1
View File
@@ -169,7 +169,9 @@ class Consumer(LoggingMixin):
# Afte performing all database operations and moving files
# into place, tell paperless where the file is.
document.filename = generate_filename(document)
document.filename = os.path.basename(document.source_path)
# Saving the document now will trigger the filename handling
# logic.
document.save()
# Delete the file only if it was successfully consumed