identifier can be 'no value', example: Q26754456

This commit is contained in:
Edward Betts 2020-01-07 17:39:39 +00:00
parent d0ddcc96eb
commit 50dc706b32

View file

@ -163,6 +163,9 @@ def check_catalog(entity, catalog):
if property_id == 'P350': if property_id == 'P350':
continue # RKDimages ID continue # RKDimages ID
value = wikibase.first_datavalue(entity, property_id) value = wikibase.first_datavalue(entity, property_id)
# identifier can be 'no value', example: Q26754456
if value is None:
continue
detail = lookup(property_id, value) detail = lookup(property_id, value)
try: try:
html = get_catalog_page(property_id, value) html = get_catalog_page(property_id, value)
@ -181,6 +184,9 @@ def get_catalog_from_artwork(entity):
catalog_detail = [] catalog_detail = []
for property_id in sorted(catalog_ids): for property_id in sorted(catalog_ids):
value = wikibase.first_datavalue(entity, property_id) value = wikibase.first_datavalue(entity, property_id)
# identifier can be 'no value', example: Q26754456
if value is None:
continue
detail = lookup(property_id, value) detail = lookup(property_id, value)
catalog_detail.append(detail) catalog_detail.append(detail)