mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-19 21:16:56 +01:00
Fix: Update filename correctly if the document is in the trash (#8066)
* Fixes an issue where the filename is not updated if the document is in the trash (but the file is moved)
This commit is contained in:
parent
ad23cce2e6
commit
335c6c3820
2 changed files with 7 additions and 3 deletions
|
|
@ -150,7 +150,7 @@ class TestFileHandling(DirectoriesMixin, FileSystemAssertsMixin, TestCase):
|
|||
|
||||
with (
|
||||
mock.patch(
|
||||
"documents.signals.handlers.Document.objects.filter",
|
||||
"documents.signals.handlers.Document.global_objects.filter",
|
||||
) as m,
|
||||
disable_auditlog(),
|
||||
):
|
||||
|
|
@ -865,7 +865,9 @@ class TestFileHandlingWithArchive(DirectoriesMixin, FileSystemAssertsMixin, Test
|
|||
archive_filename="0000001.pdf",
|
||||
archive_checksum="B",
|
||||
)
|
||||
with mock.patch("documents.signals.handlers.Document.objects.filter") as m:
|
||||
with mock.patch(
|
||||
"documents.signals.handlers.Document.global_objects.filter",
|
||||
) as m:
|
||||
m.side_effect = DatabaseError()
|
||||
doc.save()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue