Don't error out when trying to view the index instance list and none has been recalculated.
Signed-off-by: Michael Price <loneviking72@gmail.com>
This commit is contained in:
committed by
Roberto Rosario
parent
1b8333a7f8
commit
59c8bbdf2b
@@ -212,7 +212,6 @@ class TemplateNodeEditView(SingleObjectEditView):
|
||||
|
||||
class IndexListView(SingleObjectListView):
|
||||
object_permission = permission_document_indexing_view
|
||||
queryset = IndexInstance.objects.filter(enabled=True)
|
||||
|
||||
def get_extra_context(self):
|
||||
return {
|
||||
@@ -220,6 +219,10 @@ class IndexListView(SingleObjectListView):
|
||||
'title': _('Indexes'),
|
||||
}
|
||||
|
||||
def get_object_list(self):
|
||||
queryset = IndexInstance.objects.filter(enabled=True)
|
||||
return queryset.filter(node_templates__index_instance_nodes__isnull=False).distinct()
|
||||
|
||||
|
||||
class IndexInstanceNodeView(DocumentListView):
|
||||
template_name = 'document_indexing/node_details.html'
|
||||
|
||||
Reference in New Issue
Block a user