Pārlūkot izejas kodu

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

Julio-Oliveira-Encora 1 gadu atpakaļ
vecāks
revīzija
85ca750ad7
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  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