mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-21 11:37:21 -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(
|
||||
choices=TunnelStatusChoices
|
||||
)
|
||||
group = NestedTunnelGroupSerializer()
|
||||
group = NestedTunnelGroupSerializer(
|
||||
required=False,
|
||||
allow_null=True
|
||||
)
|
||||
encapsulation = ChoiceField(
|
||||
choices=TunnelEncapsulationChoices
|
||||
)
|
||||
|
@ -105,7 +105,6 @@ class TunnelTest(APIViewTestCases.APIViewTestCase):
|
||||
{
|
||||
'name': 'Tunnel 6',
|
||||
'status': TunnelStatusChoices.STATUS_DISABLED,
|
||||
'group': tunnel_groups[1].pk,
|
||||
'encapsulation': TunnelEncapsulationChoices.ENCAP_GRE,
|
||||
},
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user