From b3364d17bf26dfddbe216964cf1674b6f654fc36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?X=C3=A9fir=20Destiny?= Date: Tue, 17 Dec 2019 14:55:26 +0100 Subject: [PATCH] Fix double boldify --- app.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app.py b/app.py index 170e77d..49331c4 100644 --- a/app.py +++ b/app.py @@ -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