Simplify get_extra_addanother_params

This commit is contained in:
Renato Almeida de Oliveira Zaroubin 2025-02-10 23:29:49 +00:00
parent bea5373b78
commit a682351e58

View File

@ -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