Skip to content

Commit

Permalink
Merge pull request #18 from acdh-oeaw/parse-entity-id
Browse files Browse the repository at this point in the history
templated comments: show and link with entity id
  • Loading branch information
gythaogg authored May 13, 2024
2 parents 1e9b091 + 59850d8 commit a02b022
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apis_ontology/templatetags/parse_comment.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def custom_replace(match):
try:
root_obj = RootObject.objects_inheritance.get_subclass(pk=entity_id)
ct = ContentType.objects.get_for_model(root_obj)
return f'<a target="_BLANK" href="/apis/apis_ontology.{ct.name}/{root_obj.pk}">{root_obj}</a>'
return f'<a target="_BLANK" href="/apis/apis_ontology.{ct.name}/{root_obj.pk}">{entity_id}</a>'

except Exception as e:
logger.error("Error finding entity #%s", entity_id)
Expand Down

0 comments on commit a02b022

Please sign in to comment.