Explorar el Código

11272 make position field work correctly when internationalizion enabled

Arthur hace 2 años
padre
commit
f743f2cfb8
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  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(