Skip to content

Commit

Permalink
Simplify get_extra_addanother_params
Browse files Browse the repository at this point in the history
  • Loading branch information
renatoalmeidaoliveira committed Feb 10, 2025
1 parent bea5373 commit a682351
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions netbox/ipam/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -864,12 +864,11 @@ def alter_object(self, obj, request, url_args, url_kwargs):
return obj

def get_extra_addanother_params(self, request):
extra_params = super().get_extra_addanother_params(request)
if 'interface' in request.GET:
extra_params['interface'] = request.GET['interface']
return {'interface': request.GET['interface']}
elif 'vminterface' in request.GET:
extra_params['vminterface'] = request.GET['vminterface']
return extra_params
return {'vminterface': request.GET['vminterface']}
return {}


# TODO: Standardize or remove this view
Expand Down

0 comments on commit a682351

Please sign in to comment.