'NoneType' object has no attribute 'cable' after changing the Type but leaving the Name unchanged #2663

Closed
opened 2025-12-29 18:21:00 +01:00 by adam · 1 comment
Owner

Originally created by @fablabo on GitHub (Jun 13, 2019).

Environment

  • Python version: 3.5.3
  • NetBox version: 2.5.13

Steps to Reproduce

  1. Connect an interface by clicking the Connect icon
  2. Use the pull-down menu to select the device (switch), type (front) and name (3)
  3. Change type front to rear but leave name unchanged

Expected Behavior

A connection to switch, rear port 3 was expected.

Observed Behavior

Internal Server Error: /circuits/circuit-terminations/32/connect/

AttributeError at /circuits/circuit-terminations/32/connect/
'NoneType' object has no attribute 'cable'

In my reproducible test case I tried connecting a Circuit to a patchpanel for which i needed the rear-port instead of the front-port. After receiving an error the circuit did show a connected termination with a cable id but it was impossible to edit or remove the termination.

Deleting the related rows from tables circuits_circuittermination and dcim_cable allowed me to create a new connection to the circuit termination.

I'm guessing the Name drop-down menu needs to be refreshed after changing the Type

Originally created by @fablabo on GitHub (Jun 13, 2019). ### Environment * Python version: 3.5.3 * NetBox version: 2.5.13 ### Steps to Reproduce 1. Connect an interface by clicking the Connect icon 2. Use the pull-down menu to select the device (switch), type (front) and name (3) 3. Change type front to rear but leave name unchanged ### Expected Behavior A connection to switch, rear port 3 was expected. ### Observed Behavior ``` Internal Server Error: /circuits/circuit-terminations/32/connect/ AttributeError at /circuits/circuit-terminations/32/connect/ 'NoneType' object has no attribute 'cable' ``` In my reproducible test case I tried connecting a Circuit to a patchpanel for which i needed the rear-port instead of the front-port. After receiving an error the circuit did show a connected termination with a cable id but it was impossible to edit or remove the termination. Deleting the related rows from tables circuits_circuittermination and dcim_cable allowed me to create a new connection to the circuit termination. I'm guessing the Name drop-down menu needs to be refreshed after changing the Type
adam closed this issue 2025-12-29 18:21:00 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jun 20, 2019):

The last box refers to a specific object; the name is for display only. Once selecting a new type of component, you need to select the new component as well.

FYI the current connection form is being replace in v2.6 anyway, so this won't matter anymore.

@jeremystretch commented on GitHub (Jun 20, 2019): The last box refers to a specific object; the name is for display only. Once selecting a new type of component, you need to select the new component as well. FYI the current connection form is being replace in v2.6 anyway, so this won't matter anymore.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2663