From dfb282b4689c4a9af0d10b044709ce2223bd5be4 Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Sun, 14 May 2023 10:31:56 +0000 Subject: [PATCH] Don't show debugging output. --- matcher/api.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/matcher/api.py b/matcher/api.py index 2f8adda..d47dd69 100644 --- a/matcher/api.py +++ b/matcher/api.py @@ -264,7 +264,7 @@ WHERE tags ? 'wikidata' conn = database.session.connection() result = conn.execute(text(sql)) - print(sql) + # print(sql) point_sql = ( f""" @@ -789,7 +789,7 @@ def find_osm_candidates(item, limit=80, max_distance=450, names=None): if limit: s = s.limit(limit) - print(s.compile(compile_kwargs={"literal_binds": True})) + # print(s.compile(compile_kwargs={"literal_binds": True})) conn = database.session.connection() nearby = [] @@ -852,6 +852,7 @@ def find_osm_candidates(item, limit=80, max_distance=450, names=None): def get_item(item_id): """Retrieve a Wikidata item, either from the database or from Wikidata.""" + item = model.Item.query.get(item_id) return item or get_and_save_item(f"Q{item_id}") @@ -1031,7 +1032,7 @@ def isa_incremental_search(search_terms): func.length(en_label) < 20, ) - print(q.statement.compile(compile_kwargs={"literal_binds": True})) + # print(q.statement.compile(compile_kwargs={"literal_binds": True})) ret = [] for item in q: