From 907744cf184b5a73e7cda0cee9c80f17283a49f7 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Wed, 25 May 2016 03:11:55 -0400 Subject: [PATCH] Document page has to reference to document model. --- mayan/apps/documents/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mayan/apps/documents/views.py b/mayan/apps/documents/views.py index 63c1cbbee9..6e46bf43fc 100644 --- a/mayan/apps/documents/views.py +++ b/mayan/apps/documents/views.py @@ -306,7 +306,7 @@ class DocumentPageView(SimpleView): } def get_object(self): - return get_object_or_404(DocumentPage.objects.filter(document__document_type__organization__pk=settings.ORGANIZATION_ID), pk=self.kwargs['pk']) + return get_object_or_404(DocumentPage.objects.filter(document_version__document__document_type__organization__pk=settings.ORGANIZATION_ID), pk=self.kwargs['pk']) class DocumentPageViewResetView(RedirectView):