Skip to content

Commit

Permalink
Add get_extra_addanother_params method in IPAddressEditView
Browse files Browse the repository at this point in the history
  • Loading branch information
renatoalmeidaoliveira authored and jeremystretch committed Jan 31, 2025
1 parent 4c5fbb7 commit e12a5d2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions netbox/ipam/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,12 @@ def alter_object(self, obj, request, url_args, url_kwargs):

return obj

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


# TODO: Standardize or remove this view
@register_model_view(IPAddress, 'assign', path='assign', detail=False)
Expand Down

0 comments on commit e12a5d2

Please sign in to comment.