Skip to content

Commit a543bd4

Browse files
arthansonjeremystretch
authored andcommitted
11987 change cable bulk import to check if same cable
1 parent d03859b commit a543bd4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

netbox/dcim/forms/bulk_import.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1192,7 +1192,7 @@ def _clean_side(self, side):
11921192
termination_object = model.objects.get(device__in=device.virtual_chassis.members.all(), name=name)
11931193
else:
11941194
termination_object = model.objects.get(device=device, name=name)
1195-
if termination_object.cable is not None:
1195+
if termination_object.cable is not None and termination_object.cable != self.instance:
11961196
raise forms.ValidationError(f"Side {side.upper()}: {device} {termination_object} is already connected")
11971197
except ObjectDoesNotExist:
11981198
raise forms.ValidationError(f"{side.upper()} side termination not found: {device} {name}")

0 commit comments

Comments
 (0)