Skip to content

Conversation

@pheus
Copy link
Contributor

@pheus pheus commented Sep 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.

Apply ConfigContext to Devices located in descendant Locations of any
Location assignment. This aligns Location behavior with regions, site
groups, and roles.

Fixes netbox-community#20272
@pheus pheus marked this pull request as ready for review September 7, 2025 16:35
@jnovinger jnovinger requested review from a team and arthanson and removed request for a team September 8, 2025 03:40
Copy link
Collaborator

@arthanson arthanson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @pheus

@arthanson arthanson merged commit bf73564 into netbox-community:main Sep 10, 2025
7 checks passed
@pheus pheus deleted the 20272-add-parent-location-evaluation-to-config-context branch September 10, 2025 17:09
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ConfigContext doesn't evaluate parent locations

2 participants