Explorar o código

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

Julio-Oliveira-Encora hai 1 ano
pai
achega
85ca750ad7
Modificáronse 1 ficheiros con 1 adicións e 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