Просмотр исходного кода

Fixes #13361: Extra choices field on custom field choice set form should not be required

Jeremy Stretch 2 лет назад
Родитель
Сommit
d9f3637e25
2 измененных файлов с 6 добавлено и 0 удалено
  1. 1 0
      docs/release-notes/version-3.6.md
  2. 5 0
      netbox/extras/forms/model_forms.py

+ 1 - 0
docs/release-notes/version-3.6.md

@@ -5,6 +5,7 @@
 ### Bug Fixes
 
 * [#13351](https://github.com/netbox-community/netbox/issues/13351) - Fix missing text due to incorrectly applied translation tags
+* [#13361](https://github.com/netbox-community/netbox/issues/13361) - Extra choices field on custom field choice set form should not be required
 
 ---
 

+ 5 - 0
netbox/extras/forms/model_forms.py

@@ -89,6 +89,11 @@ class CustomFieldForm(BootstrapMixin, forms.ModelForm):
 class CustomFieldChoiceSetForm(BootstrapMixin, forms.ModelForm):
     extra_choices = forms.CharField(
         widget=ChoicesWidget(),
+        required=False,
+        help_text=_(
+            'Enter one choice per line. An optional label may be specified for each choice by appending it with a '
+            'comma (for example, "choice1,First Choice").'
+        )
     )
 
     class Meta: