Skip to content

Commit 5223486

Browse files
committed
Fixes #14709: Correct typo in TYPE_VIRTUALMACHINE
1 parent ea5d33f commit 5223486

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

netbox/vpn/choices.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ class TunnelEncapsulationChoices(ChoiceSet):
3838
class TunnelTerminationTypeChoices(ChoiceSet):
3939
# For TunnelCreateForm
4040
TYPE_DEVICE = 'dcim.device'
41-
TYPE_VIRUTALMACHINE = 'virtualization.virtualmachine'
41+
TYPE_VIRTUALMACHINE = 'virtualization.virtualmachine'
4242

4343
CHOICES = (
4444
(TYPE_DEVICE, _('Device')),
45-
(TYPE_VIRUTALMACHINE, _('Virtual Machine')),
45+
(TYPE_VIRTUALMACHINE, _('Virtual Machine')),
4646
)
4747

4848

netbox/vpn/forms/model_forms.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ class TunnelCreateForm(TunnelForm):
157157
def __init__(self, *args, initial=None, **kwargs):
158158
super().__init__(*args, initial=initial, **kwargs)
159159

160-
if get_field_value(self, 'termination1_type') == TunnelTerminationTypeChoices.TYPE_VIRUTALMACHINE:
160+
if get_field_value(self, 'termination1_type') == TunnelTerminationTypeChoices.TYPE_VIRTUALMACHINE:
161161
self.fields['termination1_parent'].label = _('Virtual Machine')
162162
self.fields['termination1_parent'].queryset = VirtualMachine.objects.all()
163163
self.fields['termination1_termination'].queryset = VMInterface.objects.all()
@@ -168,7 +168,7 @@ def __init__(self, *args, initial=None, **kwargs):
168168
'virtual_machine_id': '$termination1_parent',
169169
})
170170

171-
if get_field_value(self, 'termination2_type') == TunnelTerminationTypeChoices.TYPE_VIRUTALMACHINE:
171+
if get_field_value(self, 'termination2_type') == TunnelTerminationTypeChoices.TYPE_VIRTUALMACHINE:
172172
self.fields['termination2_parent'].label = _('Virtual Machine')
173173
self.fields['termination2_parent'].queryset = VirtualMachine.objects.all()
174174
self.fields['termination2_termination'].queryset = VMInterface.objects.all()
@@ -265,7 +265,7 @@ class Meta:
265265
def __init__(self, *args, initial=None, **kwargs):
266266
super().__init__(*args, initial=initial, **kwargs)
267267

268-
if initial and initial.get('type') == TunnelTerminationTypeChoices.TYPE_VIRUTALMACHINE:
268+
if initial and initial.get('type') == TunnelTerminationTypeChoices.TYPE_VIRTUALMACHINE:
269269
self.fields['parent'].label = _('Virtual Machine')
270270
self.fields['parent'].queryset = VirtualMachine.objects.all()
271271
self.fields['termination'].queryset = VMInterface.objects.all()

0 commit comments

Comments
 (0)