From 85ca750ad72cb3bce5af0cb07a958804d21ae7cb Mon Sep 17 00:00:00 2001 From: Julio-Oliveira-Encora Date: Mon, 20 May 2024 11:16:14 -0300 Subject: [PATCH] Changed "clean_extra_choices" in "CustomFieldChoiceSetForm" to strip the space for value and label. --- netbox/extras/forms/model_forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/extras/forms/model_forms.py b/netbox/extras/forms/model_forms.py index 1d7b69ac3..ebd6e6c08 100644 --- a/netbox/extras/forms/model_forms.py +++ b/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