Просмотр исходного кода

Fixes #18271: Require only encryption OR authentication algorithm when creating an IPSec proposal via REST API

Jeremy Stretch 1 год назад
Родитель
Сommit
b9abb3200c
1 измененных файлов с 4 добавлено и 2 удалено
  1. 4 2
      netbox/vpn/api/serializers_/crypto.py

+ 4 - 2
netbox/vpn/api/serializers_/crypto.py

@@ -64,10 +64,12 @@ class IKEPolicySerializer(NetBoxModelSerializer):
 
 
 class IPSecProposalSerializer(NetBoxModelSerializer):
 class IPSecProposalSerializer(NetBoxModelSerializer):
     encryption_algorithm = ChoiceField(
     encryption_algorithm = ChoiceField(
-        choices=EncryptionAlgorithmChoices
+        choices=EncryptionAlgorithmChoices,
+        required=False
     )
     )
     authentication_algorithm = ChoiceField(
     authentication_algorithm = ChoiceField(
-        choices=AuthenticationAlgorithmChoices
+        choices=AuthenticationAlgorithmChoices,
+        required=False
     )
     )
 
 
     class Meta:
     class Meta: