search by institutions adjusted

This commit is contained in:
2026-06-04 22:54:38 +02:00
parent ee991adf3a
commit fce1ad74b3
+2 -2
View File
@@ -531,7 +531,7 @@ def search_persons_by_institution(
raise HTTPException(
status_code=500, detail=f"Elasticsearch search failed: {str(e)}"
)
total_found = response.get("hits",{}).get("total",{}).get("value",0)
hits = response.get("hits", {}).get("hits", [])
persons = [util.get_persons_data(hit) for hit in hits]
return AuthorsListResponse(results=persons)
return AuthorsListResponse(results=persons,meta=Meta(count=total_found,page=page_offset))