Skip to content

Commit

Permalink
Fixes #15877: Consider VC membership when assigning LAG interfaces vi…
Browse files Browse the repository at this point in the history
…a bulk edit
  • Loading branch information
jeremystretch committed May 3, 2024
1 parent 39a8307 commit eb26dca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions netbox/dcim/forms/bulk_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -1411,9 +1411,9 @@ def __init__(self, *args, **kwargs):
device = Device.objects.filter(pk=self.initial['device']).first()

# Restrict parent/bridge/LAG interface assignment by device
self.fields['parent'].widget.add_query_param('device_id', device.pk)
self.fields['bridge'].widget.add_query_param('device_id', device.pk)
self.fields['lag'].widget.add_query_param('device_id', device.pk)
self.fields['parent'].widget.add_query_param('virtual_chassis_member_id', device.pk)
self.fields['bridge'].widget.add_query_param('virtual_chassis_member_id', device.pk)
self.fields['lag'].widget.add_query_param('virtual_chassis_member_id', device.pk)

# Limit VLAN choices by device
self.fields['untagged_vlan'].widget.add_query_param('available_on_device', device.pk)
Expand Down

0 comments on commit eb26dca

Please sign in to comment.