Fix: always update modified for bulk actions

This commit is contained in:
shamoon 2024-06-23 10:09:58 -07:00
parent 6ed5d11758
commit 10d4922f80

View File

@ -418,7 +418,10 @@ def update_filename_and_move_files(sender, instance: Document, **kwargs):
move_archive = False move_archive = False
if not move_original and not move_archive: if not move_original and not move_archive:
# Don't do anything if filenames did not change. # Just update modified. Also, don't save() here to prevent infinite recursion.
Document.objects.filter(pk=instance.pk).update(
modified=timezone.now(),
)
return return
if move_original: if move_original: