Przeglądaj źródła

Merge branch 'develop' into feature

jeremystretch 3 lat temu
rodzic
commit
ce87e0dfa4

+ 3 - 0
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
 
 ---
 

+ 3 - 3
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(

+ 2 - 2
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(

+ 1 - 1
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'