소스 검색

11272 make position field work correctly when internationalizion enabled

Arthur 2 년 전
부모
커밋
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(