Skip to content

Commit 26bec12

Browse files
authored
Fixes #19934: add description field to Tenant bulk edit form (#19937)
1 parent fa2d7f6 commit 26bec12

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

netbox/tenancy/forms/bulk_edit.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,17 @@ class TenantBulkEditForm(NetBoxModelBulkEditForm):
4545
queryset=TenantGroup.objects.all(),
4646
required=False
4747
)
48+
description = forms.CharField(
49+
label=_('Description'),
50+
max_length=200,
51+
required=False
52+
)
4853

4954
model = Tenant
5055
fieldsets = (
51-
FieldSet('group'),
56+
FieldSet('group', 'description'),
5257
)
53-
nullable_fields = ('group',)
58+
nullable_fields = ('group', 'description')
5459

5560

5661
#

netbox/tenancy/tests/test_views.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ def setUpTestData(cls):
9898

9999
cls.bulk_edit_data = {
100100
'group': tenant_groups[1].pk,
101+
'description': 'Bulk edit description',
101102
}
102103

103104

0 commit comments

Comments
 (0)