Stop catalog page from throwing errors.

This commit is contained in:
Edward Betts 2020-01-07 22:03:31 +00:00
parent d63e6b1218
commit 0ff8545641

4
app.py
View file

@ -686,12 +686,16 @@ def catalog_page():
qids = [f'Q{item_id}' for item_id in sorted(item_ids)] qids = [f'Q{item_id}' for item_id in sorted(item_ids)]
items = [Item.query.get(item_id) for item_id in item_ids]
entities = mediawiki.get_entities_with_cache(qids) entities = mediawiki.get_entities_with_cache(qids)
items = [] items = []
other_items = set() other_items = set()
for entity in entities: for entity in entities:
other_items.update(build_other_set(entity)) other_items.update(build_other_set(entity))
continue
item = { item = {
'label': wikibase.get_entity_label(entity), 'label': wikibase.get_entity_label(entity),
'qid': entity['id'], 'qid': entity['id'],