Move stub filtering to the Document model manager

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2019-04-13 22:39:22 -04:00
parent 334f0cd03f
commit c0f51103d2
8 changed files with 17 additions and 21 deletions
+2 -2
View File
@@ -102,7 +102,7 @@ class DocumentListView(SingleObjectListView):
}
def get_object_list(self):
return self.get_document_queryset().filter(is_stub=False)
return self.get_document_queryset()
class DocumentDocumentTypeEditView(MultipleObjectFormActionView):
@@ -203,7 +203,7 @@ class DocumentDownloadFormView(FormView):
return self.model.objects.filter(
pk__in=id_list.split(',')
).filter(is_stub=False)
)
def get_extra_context(self):
subtemplates_list = [