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

11272 make position field work correctly when internationalizion enabled

Arthur 2 лет назад
Родитель
Сommit
f743f2cfb8
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      netbox/dcim/forms/model_forms.py

+ 2 - 1
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(