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 aab5bb31de
commit f9fdb08c27
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,