From 468d1e49c73c4ebafe02a73ab86f92904625a1ca Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Wed, 19 Jun 2024 14:34:16 +0100 Subject: [PATCH] Better fix for get_item_street_addresses --- matcher/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matcher/api.py b/matcher/api.py index 057c503..8ebc159 100644 --- a/matcher/api.py +++ b/matcher/api.py @@ -951,7 +951,7 @@ def get_item_street_addresses(item: model.Item) -> list[str]: qualifiers = claim.get("qualifiers") if not qualifiers or "P670" not in qualifiers: continue - if "datavalue" not in qualifiers["P670"]: + if "datavalue" not in qualifiers["P670"][0]: print(f"datavalue missing in P670 for {item.qid}") continue number = qualifiers["P670"][0]["datavalue"]["value"]