Avoid validating cached terminations on Cable instance when loading serialized data #10393

Closed
opened 2025-12-29 21:30:52 +01:00 by adam · 0 comments
Owner

Originally created by @jeremystretch on GitHub (Oct 22, 2024).

Originally assigned to: @jeremystretch on GitHub.

Proposed Changes

This addresses a minor issue arising from the implementation of #17577: Cable.clean() should enforce that A & B terminations are defined for an instance only if its primary key is not yet defined. If a PK is already set, this implies that the cable has been populated from serialized data, and terminations will not be set on the instance.

Justification

This change is needed to address netboxlabs/netbox-branching#155. It does not impact any functionality native to NetBox itself as far as I'm aware.

Originally created by @jeremystretch on GitHub (Oct 22, 2024). Originally assigned to: @jeremystretch on GitHub. ### Proposed Changes This addresses a minor issue arising from the implementation of #17577: `Cable.clean()` should enforce that A & B terminations are defined for an instance only if its primary key is not yet defined. If a PK is already set, this implies that the cable has been populated from serialized data, and terminations will not be set on the instance. ### Justification This change is needed to address netboxlabs/netbox-branching#155. It does not impact any functionality native to NetBox itself as far as I'm aware.
adam added the status: acceptedtype: housekeepingnetbox labels 2025-12-29 21:30:52 +01:00
adam closed this issue 2025-12-29 21:30:52 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10393