mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Fixes #10980: Fix view tabs for plugin objects
This commit is contained in:
@@ -3,6 +3,7 @@ from django.urls import reverse
|
||||
from django.utils.module_loading import import_string
|
||||
|
||||
from netbox.registry import registry
|
||||
from utilities.utils import get_viewname
|
||||
|
||||
register = template.Library()
|
||||
|
||||
@@ -33,7 +34,7 @@ def model_view_tabs(context, instance):
|
||||
continue
|
||||
|
||||
if attrs := tab.render(instance):
|
||||
viewname = f"{app_label}:{model_name}_{config['name']}"
|
||||
viewname = get_viewname(instance, action=config['name'])
|
||||
active_tab = context.get('tab')
|
||||
tabs.append({
|
||||
'name': config['name'],
|
||||
|
Reference in New Issue
Block a user