Initial audit of the document index app

Add keyword arguments to calls. Sort methods and parameters.

Signed-off-by: Roberto Rosario <Roberto.Rosario.Gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2019-01-02 19:16:32 -04:00
parent 82651ff32c
commit 3dc8df46b9
12 changed files with 160 additions and 128 deletions

View File

@@ -62,7 +62,7 @@ class APIIndexNodeInstanceDocumentListView(generics.ListAPIView):
def get_queryset(self):
index_node_instance = get_object_or_404(
klass=IndexInstanceNode, pk=self.kwargs['pk']
klass=IndexInstanceNode, pk=self.kwargs['index_instance_node_pk']
)
AccessControlList.objects.check_access(
permissions=permission_document_indexing_view,
@@ -109,7 +109,7 @@ class APIDocumentIndexListView(generics.ListAPIView):
serializer_class = IndexInstanceNodeSerializer
def get_queryset(self):
document = get_object_or_404(klass=Document, pk=self.kwargs['pk'])
document = get_object_or_404(klass=Document, pk=self.kwargs['document_pk'])
AccessControlList.objects.check_access(
permissions=permission_document_view, user=self.request.user,
obj=document