Fixes #21686: Fix stale Circuit Termination association when reassigning a Termination to another Circuit #134

Closed
opened 2026-04-05 16:22:05 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @pheus on 3/17/2026

Fixes: #21686

When a circuit termination is reassigned to a different circuit, the previous circuit could retain a stale cached association. This change moves the cache update logic from the signal handler into CircuitTermination.save(), where the original circuit_id and term_side values can be tracked so the old cache is cleared correctly when either value changes.

Tests have also been added to cover the relevant cache update scenarios and help prevent regressions.

*Originally created by @pheus on 3/17/2026* ### Fixes: #21686 When a circuit termination is reassigned to a different circuit, the previous circuit could retain a stale cached association. This change moves the cache update logic from the signal handler into `CircuitTermination.save()`, where the original `circuit_id` and `term_side` values can be tracked so the old cache is cleared correctly when either value changes. Tests have also been added to cover the relevant cache update scenarios and help prevent regressions.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#134