1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixes #4084: Fix exception when creating an interface with tagged VLANs

This commit is contained in:
Jeremy Stretch
2020-02-04 11:47:14 -05:00
parent c3a6a4520a
commit cbe090cd3c
4 changed files with 11 additions and 2 deletions

View File

@@ -846,7 +846,9 @@ class ComponentCreateView(View):
def get(self, request, pk):
parent = get_object_or_404(self.parent_model, pk=pk)
form = self.form(parent, initial=request.GET)
data = deepcopy(request.GET)
data[self.parent_field] = parent.pk
form = self.form(parent, initial=data)
return render(request, self.template_name, {
'parent': parent,