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

Fixes #4052: Fix error when bulk importing interfaces to virtual machines

This commit is contained in:
Jeremy Stretch
2020-01-30 13:55:39 -05:00
parent d9b8bc0422
commit 4b02d294ce
2 changed files with 2 additions and 1 deletions

View File

@@ -2726,7 +2726,7 @@ class InterfaceCSVForm(forms.ModelForm):
super().__init__(*args, **kwargs)
# Limit LAG choices to interfaces belonging to this device (or VC master)
if self.is_bound:
if self.is_bound and 'device' in self.data:
try:
device = self.fields['device'].to_python(self.data['device'])
except forms.ValidationError: