Better fix for get_item_street_addresses

This commit is contained in:
Edward Betts 2024-06-19 14:34:16 +01:00
parent ba22e8e9df
commit 468d1e49c7

View file

@ -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"]