Add keyword arguments to get_object_or_404 uses

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2019-04-11 20:53:33 -04:00
parent 456c322c19
commit f6f9287e33
38 changed files with 169 additions and 153 deletions

View File

@@ -35,7 +35,7 @@ class DocumentCommentCreateView(SingleObjectCreateView):
).dispatch(request, *args, **kwargs)
def get_document(self):
return get_object_or_404(Document, pk=self.kwargs['pk'])
return get_object_or_404(klass=Document, pk=self.kwargs['pk'])
def get_extra_context(self):
return {
@@ -90,7 +90,7 @@ class DocumentCommentDeleteView(SingleObjectDeleteView):
class DocumentCommentListView(SingleObjectListView):
def get_document(self):
return get_object_or_404(Document, pk=self.kwargs['pk'])
return get_object_or_404(klass=Document, pk=self.kwargs['pk'])
def get_extra_context(self):
return {