Importing a cable using an already connected interface raises RelatedObjectDoesNotExist #2281

Closed
opened 2025-12-29 17:24:28 +01:00 by adam · 0 comments
Owner

Originally created by @jeremystretch on GitHub (Jan 11, 2019).

Environment

  • Python version: 3.5.2
  • NetBox version: 2.5.2

Steps to Reproduce

  1. Attempt to import a cable connecting two interfaces, at least one of which is already connected to an existing cable

Expected Behavior

The import should fail with a validation error indicating the duplicate connection.

Observed Behavior

A RelatedObjectDoesNotExist exception is raised during model validation, causing a server error.

The issue is that self.termination_a_type.model is being evaluated under Cable.clean() but ``self.termination_aandself.termination_a_type` have not been defined due to the conflict.

Originally created by @jeremystretch on GitHub (Jan 11, 2019). ### Environment * Python version: 3.5.2 * NetBox version: 2.5.2 ### Steps to Reproduce 1. Attempt to import a cable connecting two interfaces, at least one of which is already connected to an existing cable ### Expected Behavior The import should fail with a validation error indicating the duplicate connection. ### Observed Behavior A `RelatedObjectDoesNotExist` exception is raised during model validation, causing a server error. The issue is that `self.termination_a_type.model` is being evaluated under `Cable.clean()` but ``self.termination_a` and `self.termination_a_type` have not been defined due to the conflict.
adam added the type: bugstatus: accepted labels 2025-12-29 17:24:28 +01:00
adam closed this issue 2025-12-29 17:24:28 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2281