Don't display number of documents in a tag, causes extra query, give information even if user is not allowed to see which documents are tagged can now if there are documents tagged.

This commit is contained in:
Roberto Rosario
2015-07-01 17:24:39 -04:00
parent b5d2ebc781
commit ea0d724ede

View File

@@ -54,7 +54,6 @@ class TagsApp(MayanAppConfig):
SourceColumn(source=Document, label=_('Tags'), attribute=encapsulate(lambda document: widget_inline_tags(document)))
SourceColumn(source=Tag, label=_('Preview'), attribute=encapsulate(lambda tag: widget_single_tag(tag)))
SourceColumn(source=Tag, label=_('Tagged items'), attribute=encapsulate(lambda tag: tag.documents.count()))
document_search.add_model_field(field='tags__label', label=_('Tags'))