File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 2020 CSVChoiceField ,
2121 CommentField ,
2222)
23+ from utilities .forms import add_blank_choice
2324from utilities .forms .widgets import APISelect , APISelectMultiple
2425from netbox .forms import (
2526 NetBoxModelForm ,
2627 NetBoxModelBulkEditForm ,
2728 NetBoxModelFilterSetForm ,
2829 NetBoxModelImportForm ,
2930)
31+ from .choices import SessionStatusChoices
3032
3133from .models import (
3234 Community ,
@@ -206,6 +208,7 @@ class BGPSessionForm(NetBoxModelForm):
206208 )
207209 comments = CommentField ()
208210
211+
209212 fieldsets = (
210213 FieldSet (
211214 "name" ,
@@ -424,10 +427,11 @@ class BGPSessionBulkEditForm(NetBoxModelBulkEditForm):
424427 site = DynamicModelChoiceField (
425428 label = _ ("Site" ), queryset = Site .objects .all (), required = False
426429 )
430+
427431 status = forms .ChoiceField (
428- label = _ (" Status" ),
429- required = False ,
430- choices = SessionStatusChoices ,
432+ label = _ (' Status' ),
433+ choices = add_blank_choice ( SessionStatusChoices ) ,
434+ required = False
431435 )
432436 description = forms .CharField (
433437 label = _ ("Description" ), max_length = 200 , required = False
You can’t perform that action at this time.
0 commit comments