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): def boldify(name):
query = request.args.get('q') query = request.args.get('q')
name = Connector.boldify(name, query) name = Connector.boldify(name, query)
for title in AnimeTitle.query.all(): for keyword in db.session.query(AnimeTitle.keyword.distinct()).all():
if title.keyword != query: if keyword[0] is not query:
name = Connector.boldify(name, title.keyword) name = Connector.boldify(name, keyword[0])
return name return name