Skip to content

Commit

Permalink
use uri property instead of constructing uris
Browse files Browse the repository at this point in the history
  • Loading branch information
gythaogg committed Nov 17, 2024
1 parent 834d2e3 commit 2f3645b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apis_ontology/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def render_author(self, record):
context = {
"entity_id": record.author_id,
"entity_name": record.author_name,
"entity_uri": f"/apis/apis_ontology.person/{record.author_id}", # TODO: use urls
"entity_uri": Person.objects.get(pk=record.author_id).uri,
}
return mark_safe(
render_to_string("apis_ontology/linked_entity_column.html", context)
Expand Down Expand Up @@ -121,7 +121,7 @@ def render_author(self, record):
context = {
"entity_id": record.author_id,
"entity_name": record.author_name,
"entity_uri": f"/apis/apis_ontology.person/{record.author_id}", # TODO: use urls
"entity_uri": Person.objects.get(pk=record.author_id).uri,
}
return mark_safe(
render_to_string("apis_ontology/linked_entity_column.html", context)
Expand Down

0 comments on commit 2f3645b

Please sign in to comment.