Set model as attribute on bulk edit forms

This commit is contained in:
jeremystretch
2022-02-01 11:00:18 -05:00
parent 4347f624d8
commit 3621b1a0d0
10 changed files with 77 additions and 19 deletions

View File

@@ -33,6 +33,7 @@ class ClusterTypeBulkEditForm(NetBoxModelBulkEditForm):
required=False
)
model = ClusterType
nullable_fields = ('description',)
@@ -46,6 +47,7 @@ class ClusterGroupBulkEditForm(NetBoxModelBulkEditForm):
required=False
)
model = ClusterGroup
nullable_fields = ('description',)
@@ -87,6 +89,7 @@ class ClusterBulkEditForm(NetBoxModelBulkEditForm):
label='Comments'
)
model = Cluster
nullable_fields = (
'group', 'site', 'comments', 'tenant',
)
@@ -141,6 +144,7 @@ class VirtualMachineBulkEditForm(NetBoxModelBulkEditForm):
label='Comments'
)
model = VirtualMachine
nullable_fields = (
'role', 'tenant', 'platform', 'vcpus', 'memory', 'disk', 'comments',
)
@@ -193,6 +197,7 @@ class VMInterfaceBulkEditForm(NetBoxModelBulkEditForm):
required=False
)
model = VMInterface
nullable_fields = (
'parent', 'bridge', 'mtu', 'description',
)