mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 11:36:44 +00:00
(cherry picked from commit 9f01962c4e26facdd44ce55c298af837de5f36dc) Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
parent
5a06e00159
commit
864236b27a
@ -539,8 +539,11 @@ def authorized_owners(group):
|
||||
@register.simple_tag()
|
||||
def object_link(url_name, pk, ref):
|
||||
"""Return highlighted link to object."""
|
||||
try:
|
||||
ref_url = reverse(url_name, kwargs={'pk': pk})
|
||||
return mark_safe(f'<b><a href="{ref_url}">{ref}</a></b>')
|
||||
except NoReverseMatch:
|
||||
return None
|
||||
|
||||
|
||||
@register.simple_tag()
|
||||
|
Loading…
x
Reference in New Issue
Block a user