mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-21 19:47:20 -06:00
Fixes #15126: group field should be optional when creating VPN tunnel via REST API
This commit is contained in:
parent
1f800a975f
commit
df910928f2
@ -46,7 +46,10 @@ class TunnelSerializer(NetBoxModelSerializer):
|
|||||||
status = ChoiceField(
|
status = ChoiceField(
|
||||||
choices=TunnelStatusChoices
|
choices=TunnelStatusChoices
|
||||||
)
|
)
|
||||||
group = NestedTunnelGroupSerializer()
|
group = NestedTunnelGroupSerializer(
|
||||||
|
required=False,
|
||||||
|
allow_null=True
|
||||||
|
)
|
||||||
encapsulation = ChoiceField(
|
encapsulation = ChoiceField(
|
||||||
choices=TunnelEncapsulationChoices
|
choices=TunnelEncapsulationChoices
|
||||||
)
|
)
|
||||||
|
@ -105,7 +105,6 @@ class TunnelTest(APIViewTestCases.APIViewTestCase):
|
|||||||
{
|
{
|
||||||
'name': 'Tunnel 6',
|
'name': 'Tunnel 6',
|
||||||
'status': TunnelStatusChoices.STATUS_DISABLED,
|
'status': TunnelStatusChoices.STATUS_DISABLED,
|
||||||
'group': tunnel_groups[1].pk,
|
|
||||||
'encapsulation': TunnelEncapsulationChoices.ENCAP_GRE,
|
'encapsulation': TunnelEncapsulationChoices.ENCAP_GRE,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user