mirror of
				https://github.com/netbox-community/netbox.git
				synced 2024-05-10 07:54:54 +00:00 
			
		
		
		
	Fixes #8761: Correct view name resolution under journal entry views
This commit is contained in:
		@@ -154,6 +154,7 @@ Where it is desired to limit the range of available VLANs within a group, users
 | 
			
		||||
* [#8671](https://github.com/netbox-community/netbox/issues/8671) - Fix AttributeError when viewing console/power/interface connection lists
 | 
			
		||||
* [#8682](https://github.com/netbox-community/netbox/issues/8682) - Limit available VLANs by group min/max VIDs
 | 
			
		||||
* [#8683](https://github.com/netbox-community/netbox/issues/8683) - Fix `ZoneInfoNotFoundError` exception under Python 3.9+
 | 
			
		||||
* [#8761](https://github.com/netbox-community/netbox/issues/8761) - Correct view name resolution under journal entry views
 | 
			
		||||
 | 
			
		||||
### Other Changes
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -11,7 +11,7 @@ from rq import Worker
 | 
			
		||||
from netbox.views import generic
 | 
			
		||||
from utilities.forms import ConfirmationForm
 | 
			
		||||
from utilities.htmx import is_htmx
 | 
			
		||||
from utilities.utils import copy_safe_request, count_related, normalize_querydict, shallow_compare_dict
 | 
			
		||||
from utilities.utils import copy_safe_request, count_related, get_viewname, normalize_querydict, shallow_compare_dict
 | 
			
		||||
from utilities.views import ContentTypePermissionRequiredMixin
 | 
			
		||||
from . import filtersets, forms, tables
 | 
			
		||||
from .choices import JobResultStatusChoices
 | 
			
		||||
@@ -478,7 +478,7 @@ class JournalEntryEditView(generic.ObjectEditView):
 | 
			
		||||
        if not instance.assigned_object:
 | 
			
		||||
            return reverse('extras:journalentry_list')
 | 
			
		||||
        obj = instance.assigned_object
 | 
			
		||||
        viewname = f'{obj._meta.app_label}:{obj._meta.model_name}_journal'
 | 
			
		||||
        viewname = get_viewname(obj, 'journal')
 | 
			
		||||
        return reverse(viewname, kwargs={'pk': obj.pk})
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -487,7 +487,7 @@ class JournalEntryDeleteView(generic.ObjectDeleteView):
 | 
			
		||||
 | 
			
		||||
    def get_return_url(self, request, instance):
 | 
			
		||||
        obj = instance.assigned_object
 | 
			
		||||
        viewname = f'{obj._meta.app_label}:{obj._meta.model_name}_journal'
 | 
			
		||||
        viewname = get_viewname(obj, 'journal')
 | 
			
		||||
        return reverse(viewname, kwargs={'pk': obj.pk})
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user