Fix: rename only root documents in document_renamer

This commit is contained in:
Trenton H committed 2026-11-04 20:11:03 -08:00
1 parent eb297fe17e
commit c0abacee87
1 file changed
+2 -1
@@ -11,7 +11,8 @@ class Command(PaperlessCommand):
def handle(self, *args, **options):
for document in self.track(
Document.objects.only("pk"),
# move_files_for_document handles a root's versions itself
Document.objects.filter(root_document__isnull=True).only("pk"),
description="Renaming...",
):
move_files_for_document(document.pk)