From 177cc9d9850714ce70316b76aa18dd1172f71ba8 Mon Sep 17 00:00:00 2001 From: Trenton H <797416+stumpylog@users.noreply.github.com> Date: Thu, 7 Nov 2024 15:04:29 -0800 Subject: [PATCH] Fixes admin pages to show trashed documents too (#8068) --- src/documents/admin.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/documents/admin.py b/src/documents/admin.py index 5df235618..59cbf1853 100644 --- a/src/documents/admin.py +++ b/src/documents/admin.py @@ -51,6 +51,7 @@ class DocumentAdmin(GuardedModelAdmin): "archive_filename", "archive_checksum", "original_filename", + "deleted_at", ) list_display_links = ("title",) @@ -77,6 +78,12 @@ class DocumentAdmin(GuardedModelAdmin): created_.short_description = "Created" + def get_queryset(self, request): # pragma: no cover + """ + Include trashed documents + """ + return Document.global_objects.all() + def delete_queryset(self, request, queryset): from documents import index