diff --git a/docs/release-notes/version-3.1.md b/docs/release-notes/version-3.1.md index 9e6d8ad96..22c5b0da1 100644 --- a/docs/release-notes/version-3.1.md +++ b/docs/release-notes/version-3.1.md @@ -14,6 +14,9 @@ * [#8813](https://github.com/netbox-community/netbox/issues/8813) - Retain global search bar query after submitting * [#8820](https://github.com/netbox-community/netbox/issues/8820) - Fix navbar background color in dark mode * [#8850](https://github.com/netbox-community/netbox/issues/8850) - Show airflow field on device REST API serializer when config context data is included +* [#8919](https://github.com/netbox-community/netbox/issues/8919) - Fix filtering of VLAN groups by site under prefix edit form +* [#8932](https://github.com/netbox-community/netbox/issues/8932) - Fix error when setting null value for interface `rf_role` via REST API +* [#8935](https://github.com/netbox-community/netbox/issues/8935) - Correct ordering of next/previous racks to use naturalized names --- diff --git a/netbox/dcim/api/serializers.py b/netbox/dcim/api/serializers.py index 039b63ce9..d6f8b347c 100644 --- a/netbox/dcim/api/serializers.py +++ b/netbox/dcim/api/serializers.py @@ -720,9 +720,9 @@ class InterfaceSerializer(NetBoxModelSerializer, LinkTerminationSerializer, Conn parent = NestedInterfaceSerializer(required=False, allow_null=True) bridge = NestedInterfaceSerializer(required=False, allow_null=True) lag = NestedInterfaceSerializer(required=False, allow_null=True) - mode = ChoiceField(choices=InterfaceModeChoices, allow_blank=True, required=False) - duplex = ChoiceField(choices=InterfaceDuplexChoices, allow_blank=True, required=False) - rf_role = ChoiceField(choices=WirelessRoleChoices, required=False, allow_null=True) + mode = ChoiceField(choices=InterfaceModeChoices, required=False, allow_blank=True) + duplex = ChoiceField(choices=InterfaceDuplexChoices, required=False, allow_blank=True) + rf_role = ChoiceField(choices=WirelessRoleChoices, required=False, allow_blank=True) rf_channel = ChoiceField(choices=WirelessChannelChoices, required=False, allow_blank=True) untagged_vlan = NestedVLANSerializer(required=False, allow_null=True) tagged_vlans = SerializedPKRelatedField( diff --git a/netbox/dcim/views.py b/netbox/dcim/views.py index ca09514b3..d94876363 100644 --- a/netbox/dcim/views.py +++ b/netbox/dcim/views.py @@ -619,8 +619,8 @@ class RackView(generic.ObjectView): peer_racks = peer_racks.filter(location=instance.location) else: peer_racks = peer_racks.filter(location__isnull=True) - next_rack = peer_racks.filter(name__gt=instance.name).order_by('name').first() - prev_rack = peer_racks.filter(name__lt=instance.name).order_by('-name').first() + next_rack = peer_racks.filter(_name__gt=instance._name).first() + prev_rack = peer_racks.filter(_name__lt=instance._name).reverse().first() reservations = RackReservation.objects.restrict(request.user, 'view').filter(rack=instance) power_feeds = PowerFeed.objects.restrict(request.user, 'view').filter(rack=instance).prefetch_related( diff --git a/netbox/ipam/forms/models.py b/netbox/ipam/forms/models.py index aa9d7a283..e86abc672 100644 --- a/netbox/ipam/forms/models.py +++ b/netbox/ipam/forms/models.py @@ -203,7 +203,7 @@ class PrefixForm(TenancyForm, NetBoxModelForm): label='VLAN group', null_option='None', query_params={ - 'site_id': '$site' + 'site': '$site' }, initial_params={ 'vlans': '$vlan'