Fixes #21127: Clear _path on interfaces when removed from cable #352

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

Originally created by @jnovinger on 2/13/2026

Fixes: #21127

When editing a cable to remove an interface from the B side, the _path field on the removed interface was not being cleared. This caused the interface table to display stale connection info via _path.destinations, while the detail page showed correct (empty) info.

Changes:

  • dcim/signals.py: Clear _path on removed origin in nullify_connected_endpoints signal handler
  • dcim/models/cables.py: Add CablePath.delete() method to clear _path on origins (mirrors save() behavior)
  • dcim/tests/test_cablepaths.py: Extended test_303 to verify _path is cleared on removed interface
*Originally created by @jnovinger on 2/13/2026* ### Fixes: #21127 When editing a cable to remove an interface from the B side, the `_path` field on the removed interface was not being cleared. This caused the interface table to display stale connection info via `_path.destinations`, while the detail page showed correct (empty) info. **Changes**: - `dcim/signals.py`: Clear `_path` on removed origin in `nullify_connected_endpoints` signal handler - `dcim/models/cables.py`: Add `CablePath.delete()` method to clear `_path` on origins (mirrors `save()` behavior) - `dcim/tests/test_cablepaths.py`: Extended `test_303` to verify `_path` is cleared on removed interface
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#352