mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Fixes #4775: Allow selecting an alternate device type when creating component templates
This commit is contained in:
@@ -950,6 +950,10 @@ class ComponentCreateView(GetReturnURLMixin, View):
|
||||
))
|
||||
if '_addanother' in request.POST:
|
||||
return redirect(request.get_full_path())
|
||||
elif 'device_type' in form.cleaned_data:
|
||||
return redirect(form.cleaned_data['device_type'].get_absolute_url())
|
||||
elif 'device' in form.cleaned_data:
|
||||
return redirect(form.cleaned_data['device'].get_absolute_url())
|
||||
else:
|
||||
return redirect(self.get_return_url(request))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user