Document page has to reference to document model.

This commit is contained in:
Roberto Rosario
2016-05-25 03:11:55 -04:00
parent f7fd9634df
commit 907744cf18

View File

@@ -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):