diff --git a/src/documents/admin.py b/src/documents/admin.py index eda96c5c6..4097fcb3b 100755 --- a/src/documents/admin.py +++ b/src/documents/admin.py @@ -152,8 +152,10 @@ class DocumentAdmin(CommonAdmin): def changelist_view(self, request, extra_context=None): response = super().changelist_view(request, extra_context) - if 'cl' in response.context_data: - self.document_queue = [doc.id for doc in response.context_data['cl'].queryset] + + if request.method == 'GET': + cl = self.get_changelist_instance(request) + self.document_queue = [doc.id for doc in cl.queryset] return response