nautobot / nautobot-app-ssot

Single Source of Truth for Nautobot
https://docs.nautobot.com/projects/ssot/en/latest/
Other
38 stars 41 forks source link

Allow not controlling all objects in many-to-many relationship with contrib #592

Open Kircheneer opened 3 weeks ago

Kircheneer commented 3 weeks ago

Environment

Currently set is used on the relationship: https://github.com/nautobot/nautobot-app-ssot/blob/ltm-1.6/nautobot_ssot/contrib/model.py#L305

Proposed Functionality

Make it possible to not control all objects associated through a many to many relationship.

Use Case

For example to keep existing tags when adding new ones.

Kircheneer commented 3 weeks ago

This may be solvable by providing a way to control the scope of the queryset on many to many relationships, i.e. only tags.filter(name__startswith="some_prefix").