From f743f2cfb812435f5ca2b4620b2b30d5dabeedfc Mon Sep 17 00:00:00 2001 From: Arthur Date: Thu, 17 Aug 2023 15:18:52 -0700 Subject: [PATCH] 11272 make position field work correctly when internationalizion enabled --- netbox/dcim/forms/model_forms.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/netbox/dcim/forms/model_forms.py b/netbox/dcim/forms/model_forms.py index 3c02e6e4e..e0d7b299a 100644 --- a/netbox/dcim/forms/model_forms.py +++ b/netbox/dcim/forms/model_forms.py @@ -401,12 +401,13 @@ class DeviceForm(TenancyForm, NetBoxModelForm): position = forms.DecimalField( required=False, help_text=_("The lowest-numbered unit occupied by the device"), + localize=True, widget=APISelect( api_url='/api/dcim/racks/{{rack}}/elevation/', attrs={ 'disabled-indicator': 'device', 'data-dynamic-params': '[{"fieldName":"face","queryParam":"face"}]' - } + }, ) ) device_type = DynamicModelChoiceField(