Skip to content

Commit

Permalink
fix: given name in citation details page + search filtering URL (#385)
Browse files Browse the repository at this point in the history
* fix: reflect changes to data source structure

* fix: mypy complaint
  • Loading branch information
stefanomunarini authored Dec 20, 2023
1 parent 430bd36 commit 5858747
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion main/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ def build_citation_for_docid(
])
if primary_docid:
refs = query_suppressing_user_input_error(
lambda: search_refs_docids(typeCast(DocID, primary_docid))
lambda: search_refs_docids(primary_docid)
) or []

composite_item, valid = compose_bibitem(
Expand Down
2 changes: 1 addition & 1 deletion main/templates/relaton/contributor.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</a>
{% endwith %}
{% elif val.person.name %}
{% with link=val|substruct_search_link:'{"contributor": [%s]};as_list=yes;only=person.name.completename.content,person.name.surname.content,person.name.forename[*].content' %}
{% with link=val|substruct_search_link:'{"contributor": [%s]};as_list=yes;only=person.name.completename.content,person.name.surname.content,person.name.given.forename[*].content' %}
<a class="link" href="{{ link }}" title="Individual’s name">
{% include "relaton/person_name.html" with val=val.person.name %}
</a>
Expand Down
2 changes: 1 addition & 1 deletion main/templates/relaton/person_name.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% load common %}

{% with val.surname.content as surname and val.completename.content as fullname and val.forename as given_names and val.initial|as_list as initials %}
{% with val.surname.content as surname and val.completename.content as fullname and val.given.forename as given_names and val.initial|as_list as initials %}
{% if fullname %}
{{ fullname }}
{% else %}
Expand Down

0 comments on commit 5858747

Please sign in to comment.