Include labels for ISA items in item detail.

This commit is contained in:
Edward Betts 2021-11-13 20:19:04 +00:00
parent 84a2cfa5ad
commit 9a841921f4

View file

@ -778,6 +778,8 @@ def item_detail(item):
"label": heritage_designation_item.label(), "label": heritage_designation_item.label(),
}) })
isa_items = [get_item(isa["numeric-id"]) for isa in item.get_isa()]
d = { d = {
"qid": item.qid, "qid": item.qid,
"label": item.label(), "label": item.label(),
@ -785,11 +787,7 @@ def item_detail(item):
"markers": locations, "markers": locations,
"image_list": image_filenames, "image_list": image_filenames,
"street_address": street_address, "street_address": street_address,
# "isa_list": item.get_isa_qids(), "isa_list": [{"qid": isa.qid, "label": isa.label()} for isa in isa_items if isa],
"isa_list": [
{"qid": isa["id"], "label": get_item(isa["numeric-id"]).label()}
for isa in item.get_isa()
],
"closed": item.closed(), "closed": item.closed(),
"heritage_designation": heritage_designation, "heritage_designation": heritage_designation,
} }