Selaa lähdekoodia

Fixes #8932: Fix error when setting null value for interface rf_role via REST API

jeremystretch 3 vuotta sitten
vanhempi
commit
e6980626d8
2 muutettua tiedostoa jossa 3 lisäystä ja 2 poistoa
  1. 1 0
      docs/release-notes/version-3.1.md
  2. 2 2
      netbox/dcim/api/serializers.py

+ 1 - 0
docs/release-notes/version-3.1.md

@@ -14,6 +14,7 @@
 * [#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
+* [#8932](https://github.com/netbox-community/netbox/issues/8932) - Fix error when setting null value for interface `rf_role` via REST API
 
 ---
 

+ 2 - 2
netbox/dcim/api/serializers.py

@@ -619,8 +619,8 @@ class InterfaceSerializer(PrimaryModelSerializer, LinkTerminationSerializer, Con
     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)
-    rf_role = ChoiceField(choices=WirelessRoleChoices, required=False, allow_null=True)
+    mode = ChoiceField(choices=InterfaceModeChoices, 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(