-
Notifications
You must be signed in to change notification settings - Fork 68
Closed
Description
Hello there!
It seems to be the problem when trying to display device with existing incomplete cable termination (e.g. when termination A is defined and termination B does not exist)
The complete exception is provided below:
<class 'IndexError'>
list index out of range
Python version: 3.12.3
NetBox version: 4.1.4
Plugins:
netbox_reorder_rack: 1.1.3
nextbox_ui_plugin: 1.0.1
Incomplete cable terminations may arrive when deleting an adjacent interface (or the entire device).
It might be enough to exclude such connections here:
nextbox-ui-plugin/nextbox_ui_plugin/views.py
Lines 432 to 441 in 6c14c90
for link in links_from_device: | |
# Exclude PowerFeed-connected links | |
if (isinstance(link.a_terminations[0], PowerFeed) or (isinstance(link.b_terminations[0], PowerFeed))): | |
continue | |
# Exclude CircuitTermination-connected links | |
if (isinstance(link.a_terminations[0], CircuitTermination) or (isinstance(link.b_terminations[0], CircuitTermination))): | |
continue | |
# Include links to discovered devices only | |
if link.b_terminations[0].device_id in device_ids: | |
links.append(link) |
But there may be a few more places I haven't noticed.
iDebugAll
Metadata
Metadata
Assignees
Labels
No labels