diff --git a/docs/release-notes/version-2.11.md b/docs/release-notes/version-2.11.md index cf0ca9cd5..b7d642d18 100644 --- a/docs/release-notes/version-2.11.md +++ b/docs/release-notes/version-2.11.md @@ -22,6 +22,7 @@ * [#6355](https://github.com/netbox-community/netbox/issues/6355) - Fix caching error when swapping A/Z circuit terminations * [#6357](https://github.com/netbox-community/netbox/issues/6357) - Fix ProviderNetwork nested API serializer * [#6363](https://github.com/netbox-community/netbox/issues/6363) - Correct pre-population of cluster group when creating a cluster +* [#6369](https://github.com/netbox-community/netbox/issues/6369) - Fix interface assignment for VLANs in non-scoped groups --- diff --git a/netbox/ipam/querysets.py b/netbox/ipam/querysets.py index 1a723421d..784d58342 100644 --- a/netbox/ipam/querysets.py +++ b/netbox/ipam/querysets.py @@ -64,6 +64,7 @@ class VLANQuerySet(RestrictedQuerySet): return self.filter( Q(group__in=VLANGroup.objects.filter(q)) | Q(site=device.site) | + Q(group__scope_id__isnull=True, site__isnull=True) | # Global group VLANs Q(group__isnull=True, site__isnull=True) # Global VLANs ) @@ -104,6 +105,7 @@ class VLANQuerySet(RestrictedQuerySet): # Return all applicable VLANs q = ( Q(group__in=vlan_groups) | + Q(group__scope_id__isnull=True, site__isnull=True) | # Global group VLANs Q(group__isnull=True, site__isnull=True) # Global VLANs ) if vm.cluster.site: