Fixes #20912: Clear ModuleBay parent when module assignment removed #737

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

Originally created by @jnovinger on 12/12/2025

Fixes: #20912

When a ModuleBay's module field is cleared (returning it to device-level), the parent field was not being updated, leaving stale MPTT tree data.

The save() method only set parent when module was present, but failed to clear it when module was removed. Now explicitly sets parent to None when module is cleared.

*Originally created by @jnovinger on 12/12/2025* ### Fixes: #20912 When a ModuleBay's `module` field is cleared (returning it to device-level), the parent field was not being updated, leaving stale MPTT tree data. The `save()` method only set parent when module was present, but failed to clear it when module was removed. Now explicitly sets parent to None when module is cleared.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#737