Skip to content

Commit f11ad99

Browse files
committed
Fixes #8611: Fix bulk editing for certain custom link, webhook, and journal entry fields
1 parent e1ef911 commit f11ad99

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

docs/release-notes/version-3.1.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
* [#8564](https://github.com/netbox-community/netbox/issues/8564) - Fix errant table configuration key `available_columns`
1616
* [#8578](https://github.com/netbox-community/netbox/issues/8578) - Object change log tables should honor user's configured preferences
1717
* [#8604](https://github.com/netbox-community/netbox/issues/8604) - Fix tag filter on config context list filter form
18+
* [#8611](https://github.com/netbox-community/netbox/issues/8611) - Fix bulk editing for certain custom link, webhook, and journal entry fields
1819

1920
---
2021

netbox/extras/forms/bulk_edit.py

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
from extras.choices import *
55
from extras.models import *
66
from extras.utils import FeatureQuery
7-
from utilities.forms import BulkEditForm, BulkEditNullBooleanSelect, ColorField, ContentTypeChoiceField, StaticSelect
7+
from utilities.forms import (
8+
add_blank_choice, BulkEditForm, BulkEditNullBooleanSelect, ColorField, ContentTypeChoiceField, StaticSelect,
9+
)
810

911
__all__ = (
1012
'ConfigContextBulkEditForm',
@@ -55,7 +57,7 @@ class CustomLinkBulkEditForm(BulkEditForm):
5557
required=False
5658
)
5759
button_class = forms.ChoiceField(
58-
choices=CustomLinkButtonClassChoices,
60+
choices=add_blank_choice(CustomLinkButtonClassChoices),
5961
required=False,
6062
widget=StaticSelect()
6163
)
@@ -117,21 +119,25 @@ class WebhookBulkEditForm(BulkEditForm):
117119
widget=BulkEditNullBooleanSelect()
118120
)
119121
http_method = forms.ChoiceField(
120-
choices=WebhookHttpMethodChoices,
121-
required=False
122+
choices=add_blank_choice(WebhookHttpMethodChoices),
123+
required=False,
124+
label='HTTP method'
122125
)
123126
payload_url = forms.CharField(
124-
required=False
127+
required=False,
128+
label='Payload URL'
125129
)
126130
ssl_verification = forms.NullBooleanField(
127131
required=False,
128-
widget=BulkEditNullBooleanSelect()
132+
widget=BulkEditNullBooleanSelect(),
133+
label='SSL verification'
129134
)
130135
secret = forms.CharField(
131136
required=False
132137
)
133138
ca_file_path = forms.CharField(
134-
required=False
139+
required=False,
140+
label='CA file path'
135141
)
136142

137143
class Meta:
@@ -185,7 +191,7 @@ class JournalEntryBulkEditForm(BulkEditForm):
185191
widget=forms.MultipleHiddenInput
186192
)
187193
kind = forms.ChoiceField(
188-
choices=JournalEntryKindChoices,
194+
choices=add_blank_choice(JournalEntryKindChoices),
189195
required=False
190196
)
191197
comments = forms.CharField(

0 commit comments

Comments
 (0)