From b49d92b0bd57e0cde689ed8023729f2b37a92aa1 Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Wed, 6 Oct 2021 18:43:37 +0200 Subject: [PATCH] Include heritage designation in Wikidata item details --- matcher/api.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/matcher/api.py b/matcher/api.py index 86dab52..71adb80 100644 --- a/matcher/api.py +++ b/matcher/api.py @@ -648,6 +648,9 @@ def item_detail(item): street_address = get_item_street_addresses(item) + heritage_designation = [get_item(v["numeric-id"]).label() + for v in item.get_claim("P1435")] + d = { "qid": item.qid, "label": item.label(), @@ -657,6 +660,7 @@ def item_detail(item): "street_address": street_address, "isa_list": item.get_isa_qids(), "closed": item.closed(), + "heritage_designation": heritage_designation, } if aliases := item.get_aliases():