mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-26 18:38:38 -06:00
* Add plugin support to GetReturnURLMixin * use get_viewname instead of resolving the name
This commit is contained in:
parent
b2d247c5a9
commit
671aab1623
@ -149,9 +149,8 @@ class GetReturnURLMixin:
|
||||
|
||||
# Attempt to dynamically resolve the list view for the object
|
||||
if hasattr(self, 'queryset'):
|
||||
model_opts = self.queryset.model._meta
|
||||
try:
|
||||
return reverse(f'{model_opts.app_label}:{model_opts.model_name}_list')
|
||||
return reverse(get_viewname(self.queryset.model, 'list'))
|
||||
except NoReverseMatch:
|
||||
pass
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user