This commit is contained in:
Edward Betts 2024-05-04 10:06:01 +03:00
commit b052156460
4 changed files with 5 additions and 3 deletions

View file

@ -1020,7 +1020,7 @@ def item_detail(item: model.Item) -> ItemDetailType:
)
isa_items = [get_item(isa["numeric-id"]) for isa in item.get_isa()]
isa_lookup = {isa.qid: isa for isa in isa_items}
isa_lookup = {isa.qid: isa for isa in isa_items if isa}
wikipedia_links = [
{"lang": site[:-4], "title": link["title"]}

View file

@ -10,7 +10,7 @@ from sqlalchemy.orm import scoped_session, sessionmaker
session: sqlalchemy.orm.scoping.scoped_session = scoped_session(sessionmaker())
timeout = 2_000 # 20 seconds
timeout = 20_000 # 20 seconds
def init_db(db_url: str, echo: bool = False) -> None:

View file

@ -118,7 +118,7 @@ def get_hit_name(hit: Hit) -> str:
def get_hit_label(hit: Hit) -> str:
"""Parse hit and generate label."""
tags = hit["extratags"]
tags = hit["extratags"] or {}
designation = tags.get("designation")
category = hit["category"]
hit_type = hit["type"]

View file

@ -17,6 +17,8 @@
},
"devDependencies": {
"@vitejs/plugin-vue": "^4.4.0",
"eslint": "^9.2.0",
"eslint-plugin-vue": "^9.25.0",
"rollup-plugin-esm-import-to-url": "^2.1.0",
"vite": "^4.5.0"
}