diff --git a/service/src/main/inse/works/logic.py b/service/src/main/inse/works/logic.py
index 43a6135a..ddf63707 100644
--- a/service/src/main/inse/works/logic.py
+++ b/service/src/main/inse/works/logic.py
@@ -129,6 +129,33 @@ async def get_primary_topic_counts(
for item in items
]
+
+async def get_work(
+ work_id: str,
+ client: OpenAlexWorksSearchClient | None = None,
+) -> Work:
+ search_client = client or OpenAlexWorksSearchClient()
+ try:
+ data = await search_client.search_work(work_id)
+ except MissingApiKeyError as exc:
+ raise HTTPException(
+ status_code=HTTP_503_SERVICE_UNAVAILABLE,
+ detail="OpenAlex works search is not configured.",
+ ) from exc
+ except httpx.HTTPError as exc:
+ raise HTTPException(
+ status_code=HTTP_502_BAD_GATEWAY,
+ detail="OpenAlex works search request failed.",
+ ) from exc
+ elements, _ = _parse_full_work_search_response(data)
+ if not elements:
+ raise HTTPException(
+ status_code=HTTP_404_NOT_FOUND,
+ detail="Publication not found.",
+ )
+ return elements[0]
+
+
def _get_topic_descriptions(topic_ids: List[str]) -> dict[str, str]:
if not topic_ids:
return {}
@@ -182,6 +209,7 @@ def _limit_works_by_complete_years(
return selected_works
+
async def _get_limited_author_works_by_complete_years(
author_id: str,
target_publications: int,
@@ -416,7 +444,7 @@ def _parse_full_work_search_response(data: dict) -> tuple[list[Work], int]:
source_copy["title"] = source_copy["display_name"]
elif not source_copy.get("display_name") and source_copy.get("title"):
source_copy["display_name"] = source_copy["title"]
-
+
# Resilient sanitization of IDs to protect against model regeneration type conflicts
ids = source_copy.get("ids")
if isinstance(ids, dict):
diff --git a/webapp/src/app/modules/person-network-institutions/person-network-institutions.component.html b/webapp/src/app/modules/person-network-institutions/person-network-institutions.component.html
index 22621d39..d523b2dc 100644
--- a/webapp/src/app/modules/person-network-institutions/person-network-institutions.component.html
+++ b/webapp/src/app/modules/person-network-institutions/person-network-institutions.component.html
@@ -12,18 +12,6 @@
{{ element.collaborators.length }}
-
-
-
-
-