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: