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

Fixes #4295: Fix assignment of parent LAG during interface bulk edit

This commit is contained in:
Jeremy Stretch
2020-02-28 09:44:41 -05:00
parent bdf9857e6f
commit 1449dfc966
3 changed files with 10 additions and 6 deletions

View File

@@ -716,7 +716,10 @@ class BulkEditView(GetReturnURLMixin, View):
messages.error(self.request, "{} failed validation: {}".format(obj, e))
else:
form = self.form(model, initial={'pk': pk_list})
# Pass GET parameters as initial data for the form, and include the PK list
initial_data = request.GET.copy()
initial_data.update({'pk': pk_list})
form = self.form(model, initial=initial_data)
# Retrieve objects being edited
table = self.table(self.queryset.filter(pk__in=pk_list), orderable=False)