mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-26 17:26:10 -06:00
Update netbox/utilities/utils.py
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
This commit is contained in:
parent
72d0b3dc11
commit
c701c39618
@ -49,7 +49,7 @@ def get_viewname(model, action=None, rest_api=False):
|
|||||||
viewname = f'plugins-api:{app_label}-api:{model_name}'
|
viewname = f'plugins-api:{app_label}-api:{model_name}'
|
||||||
else:
|
else:
|
||||||
# Alter the app_label for group and user model_name to point to users app
|
# Alter the app_label for group and user model_name to point to users app
|
||||||
if model_name in ['group', 'user']:
|
if app_label == 'auth' and model_name in ['group', 'user']:
|
||||||
app_label = 'users'
|
app_label = 'users'
|
||||||
|
|
||||||
viewname = f'{app_label}-api:{model_name}'
|
viewname = f'{app_label}-api:{model_name}'
|
||||||
|
Loading…
Reference in New Issue
Block a user