Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes 18095: inherit contacts #18704

Merged
merged 5 commits into from
Feb 25, 2025

Conversation

alehaa
Copy link
Contributor

@alehaa alehaa commented Feb 21, 2025

Fixes: #18095

Contacts for a NestedGroupModel will also include the contact assignments of the parents.

While at first it seemed tempting to include other related contact assignments (e.g. for a Location those of a Site), this is much more complicated than expected. The code proposed in this PR can also handle these relationships by iterating over related objects and adding constraints to the filter. In practice, however, it remains unclear which relationships are important to users, as these may vary between different NetBox deployments and even within a single deployment. In this case, I suggest opening a new FR with details of a possible lookup logic and adding it to get_contacts().

@alehaa alehaa marked this pull request as draft February 25, 2025 17:39
@alehaa alehaa marked this pull request as ready for review February 25, 2025 17:54
@bctiemann bctiemann merged commit 8dc2154 into netbox-community:feature Feb 25, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants