mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-11-05 06:19:25 +00:00
Fix: rename only root documents in document_renamer
This commit is contained in:
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)
|
||||
Reference in new issue
Block a user