mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Fixes #6369: Fix interface assignment for VLANs in non-scoped groups
This commit is contained in:
@ -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
|
||||
|
||||
---
|
||||
|
||||
|
@ -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:
|
||||
|
Reference in New Issue
Block a user