Explicit document type needes to trigger indexing of documents, previously indexes with no document type associated would update for all document types

This commit is contained in:
Roberto Rosario
2015-01-07 03:39:11 -04:00
parent e75af75368
commit 5cdc95e99f
3 changed files with 5 additions and 5 deletions

View File

@@ -44,8 +44,7 @@ class Index(models.Model):
IndexTemplateNode.objects.get_or_create(parent=None, index=self)
def get_document_types_names(self):
# TODO: explicit document type selection, none != all
return u', '.join([unicode(document_type) for document_type in self.document_types.all()] or [u'All'])
return u', '.join([unicode(document_type) for document_type in self.document_types.all()] or [u'None'])
def natural_key(self):
return (self.name,)