diff --git a/InvenTree/part/templatetags/inventree_extras.py b/InvenTree/part/templatetags/inventree_extras.py index 9abd6748bf..cdb63aacd1 100644 --- a/InvenTree/part/templatetags/inventree_extras.py +++ b/InvenTree/part/templatetags/inventree_extras.py @@ -539,8 +539,11 @@ def authorized_owners(group): @register.simple_tag() def object_link(url_name, pk, ref): """Return highlighted link to object.""" - ref_url = reverse(url_name, kwargs={'pk': pk}) - return mark_safe(f'{ref}') + try: + ref_url = reverse(url_name, kwargs={'pk': pk}) + return mark_safe(f'{ref}') + except NoReverseMatch: + return None @register.simple_tag()