aboutsummaryrefslogtreecommitdiff
path: root/backend/server.py
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2022-05-11 12:43:38 +1000
committerTerry Truong <terry06890@gmail.com>2022-05-11 12:43:38 +1000
commit4872ce9c22cc3c7024075f66409efdaf8860e9b8 (patch)
treef47f0683a2260ac4a41062615e344d1c9b847c3c /backend/server.py
parent6c61612564b9a30f747207c43729c3e7e8cbf0d3 (diff)
Do minor code cleanup
Diffstat (limited to 'backend/server.py')
-rwxr-xr-xbackend/server.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/backend/server.py b/backend/server.py
index e778c2f..9c9764b 100755
--- a/backend/server.py
+++ b/backend/server.py
@@ -94,9 +94,7 @@ def lookupName(name):
results = []
hasMore = False
for row in cur.execute(
- "SELECT DISTINCT names.name, names.alt_name, nodes.tips FROM" \
- " names INNER JOIN nodes ON names.name = nodes.name " \
- " WHERE alt_name LIKE ? ORDER BY length(alt_name) LIMIT ?",
+ "SELECT DISTINCT name, alt_name FROM names WHERE alt_name LIKE ? ORDER BY length(alt_name) LIMIT ?",
(name + "%", SEARCH_SUGG_LIMIT)):
results.append({"name": row[0], "altName": row[1]})
if len(results) > SEARCH_SUGG_LIMIT: