Fix double boldify

This commit is contained in:
Michel Roux 2019-12-17 14:55:26 +01:00
parent d617c94c2f
commit b3364d17bf

6
app.py
View File

@ -16,9 +16,9 @@ def verify_password(username, password):
def boldify(name):
query = request.args.get('q')
name = Connector.boldify(name, query)
for title in AnimeTitle.query.all():
if title.keyword != query:
name = Connector.boldify(name, title.keyword)
for keyword in db.session.query(AnimeTitle.keyword.distinct()).all():
if keyword[0] is not query:
name = Connector.boldify(name, keyword[0])
return name