diff --git a/service/src/main/inse/logic.py b/service/src/main/inse/logic.py index 645df10b..e4d37cca 100644 --- a/service/src/main/inse/logic.py +++ b/service/src/main/inse/logic.py @@ -288,6 +288,12 @@ def search_persons( ids_copy[str_field] = str(val) source_copy["ids"] = ids_copy + topics = source_copy.get("topics") + if isinstance(topics, list): + for topic in topics: + if isinstance(topic, dict) and topic.get("score") is None: + topic["score"] = topic.get("count") + author = Author.from_dict(source_copy) if author: authors.append(author) diff --git a/webapp/src/app/modules/person-interesting/person-interesting.component.html b/webapp/src/app/modules/person-interesting/person-interesting.component.html index 7f79895c..27c9bd2b 100644 --- a/webapp/src/app/modules/person-interesting/person-interesting.component.html +++ b/webapp/src/app/modules/person-interesting/person-interesting.component.html @@ -3,7 +3,7 @@
@if (tags().length > 0) { @for (tag of tags(); track tag.label) { - + } } @else { Keine Themen gefunden diff --git a/webapp/src/app/modules/person/person.component.ts b/webapp/src/app/modules/person/person.component.ts index f8b61e2c..accaf82e 100644 --- a/webapp/src/app/modules/person/person.component.ts +++ b/webapp/src/app/modules/person/person.component.ts @@ -50,7 +50,7 @@ export class PersonComponent { switchMap((id) => { if (!id) return of(null); this.isPersonLoading.set(true); - return this.personsApi.searchPersons(id, PERSON_INCLUDE_TAGS).pipe( + return this.personsApi.searchPersons(id, undefined, PERSON_INCLUDE_TAGS).pipe( map((result) => result.results?.[0] ?? null), catchError((err) => { console.error('Failed to load person:', err);