Fixes #20272: Inherit ConfigContext from ancestors locations #1300

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

Originally created by @pheus on 9/7/2025

Fixes: #20272

Make ConfigContext on a parent Location apply to devices in its child Locations.

  • Aligns Locations with regions/site groups/roles.
  • Updates querysets to include ancestor Locations
    (get_ancestors(include_self=True) and an MPTT-based join for devices).
  • No schema or API changes.

Before: Context on Location A didn’t apply to a device in child Location B.
After: It does.

*Originally created by @pheus on 9/7/2025* ### Fixes: #20272 Make `ConfigContext` on a **parent Location** apply to devices in its **child Locations**. - Aligns Locations with regions/site groups/roles. - Updates querysets to include ancestor Locations (`get_ancestors(include_self=True)` and an MPTT-based join for devices). - No schema or API changes. **Before:** Context on Location A didn’t apply to a device in child Location B. **After:** It does.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#1300