fix: user: link to bookmark with empty tag

This commit is contained in:
rachmadaniHaryono 2018-10-29 05:40:56 +08:00 committed by Arun Prakash Jana
parent 3b95f7cfca
commit c4f93cec82
No known key found for this signature in database
GPG Key ID: A75979F35C080412

View File

@ -353,9 +353,13 @@ class TagModelView(BaseModelView):
def _name_formatter(self, context, model, name):
data = getattr(model, name)
if not data:
return Markup('<a href="{}">{}</a>'.format(
url_for('bookmark.index_view', flt2_tags_number_equal=0),
'&lt;EMPTY TAG&gt;'
))
return Markup('<a href="{}">{}</a>'.format(
url_for('bookmark.index_view', flt1_tags_contain=data),
data if data else '&lt;EMPTY TAG&gt;'
url_for('bookmark.index_view', flt1_tags_contain=data), data
))
can_create = False