Explorar el Código

Changed "clean_extra_choices" in "CustomFieldChoiceSetForm" to strip the space for value and label.

Julio-Oliveira-Encora hace 1 año
padre
commit
85ca750ad7
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      netbox/extras/forms/model_forms.py

+ 1 - 1
netbox/extras/forms/model_forms.py

@@ -122,7 +122,7 @@ class CustomFieldChoiceSetForm(forms.ModelForm):
                 label = label.replace('\\:', ':')
             except ValueError:
                 value, label = line, line
-            data.append((value, label))
+            data.append((value.strip(), label.strip()))
         return data