mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-21 21:02:23 -06:00
Add JournalEntry tests
This commit is contained in:
@@ -304,6 +304,8 @@ class JournalEntryEditView(generic.ObjectEditView):
|
||||
return obj
|
||||
|
||||
def get_return_url(self, request, instance):
|
||||
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'
|
||||
return reverse(viewname, kwargs={'pk': obj.pk})
|
||||
|
||||
Reference in New Issue
Block a user