mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-28 03:16:25 -06:00
Simplify get_extra_addanother_params
This commit is contained in:
parent
bea5373b78
commit
a682351e58
@ -864,12 +864,11 @@ class IPAddressEditView(generic.ObjectEditView):
|
|||||||
return obj
|
return obj
|
||||||
|
|
||||||
def get_extra_addanother_params(self, request):
|
def get_extra_addanother_params(self, request):
|
||||||
extra_params = super().get_extra_addanother_params(request)
|
|
||||||
if 'interface' in request.GET:
|
if 'interface' in request.GET:
|
||||||
extra_params['interface'] = request.GET['interface']
|
return {'interface': request.GET['interface']}
|
||||||
elif 'vminterface' in request.GET:
|
elif 'vminterface' in request.GET:
|
||||||
extra_params['vminterface'] = request.GET['vminterface']
|
return {'vminterface': request.GET['vminterface']}
|
||||||
return extra_params
|
return {}
|
||||||
|
|
||||||
|
|
||||||
# TODO: Standardize or remove this view
|
# TODO: Standardize or remove this view
|
||||||
|
Loading…
Reference in New Issue
Block a user