Add get_extra_addanother_params method in IPAddressEditView

This commit is contained in:
Renato Almeida de Oliveira Zaroubin 2025-01-30 18:26:17 +00:00 committed by Jeremy Stretch
parent 4c5fbb7326
commit e12a5d2edc

View File

@ -863,6 +863,12 @@ class IPAddressEditView(generic.ObjectEditView):
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)