Fixes #21498: serialize cabled object models for events when cables are changed #23

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

Originally created by @bogi788 on 4/2/2026

Fixes: #21498

As reported in #21498 Netbox 4.5.2 and newer result in CablePath.DoesNotExist errors when cables are changed if event rules are enabled.

This MR works around this issue by serializing objects in enqueue_event like in Netbox 4.5.1 and before if they are instances of dcim.models.CabledObjectModel and the cable id differs from that in the prechange snapshot (if set).

*Originally created by @bogi788 on 4/2/2026* <!-- Thank you for your interest in contributing to NetBox! Please note that our contribution policy requires that a feature request or bug report be approved and assigned prior to opening a pull request. This helps avoid waste time and effort on a proposed change that we might not be able to accept. IF YOUR PULL REQUEST DOES NOT REFERENCE AN ISSUE WHICH HAS BEEN ASSIGNED TO YOU, IT WILL BE CLOSED AUTOMATICALLY. Please specify your assigned issue number on the line below. --> ### Fixes: #21498 <!-- Please include a summary of the proposed changes below. --> As reported in #21498 Netbox 4.5.2 and newer result in `CablePath.DoesNotExist` errors when cables are changed if event rules are enabled. This MR works around this issue by serializing objects in `enqueue_event` like in Netbox 4.5.1 and before if they are instances of `dcim.models.CabledObjectModel` and the cable id differs from that in the prechange snapshot (if set).
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#23