From 8be1f9d5a17c76a04d48647640035e77187c7ce0 Mon Sep 17 00:00:00 2001 From: Daniel Sheppard Date: Fri, 26 Jan 2024 15:31:36 -0600 Subject: [PATCH] Fixes: #14840 - Better fix for netboxusers-list --- netbox/utilities/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/netbox/utilities/utils.py b/netbox/utilities/utils.py index f3f8c7c50..05597b80c 100644 --- a/netbox/utilities/utils.py +++ b/netbox/utilities/utils.py @@ -52,6 +52,8 @@ def get_viewname(model, action=None, rest_api=False): # Alter the app_label for group and user model_name to point to users app if app_label == 'auth' and model_name in ['group', 'user']: app_label = 'users' + if app_label == 'users' and model._meta.proxy and model_name in ['netboxuser', 'netboxgroup']: + model_name = model._meta.proxy_for_model._meta.model_name viewname = f'{app_label}-api:{model_name}' # Append the action, if any