Closes #19740: Enable recursive nesting for platforms

This commit is contained in:
Jeremy Stretch
2025-08-07 15:52:27 -04:00
parent 33d891e67b
commit 148fac1086
22 changed files with 286 additions and 41 deletions

View File

@@ -682,6 +682,11 @@ class DeviceRoleBulkEditForm(NetBoxModelBulkEditForm):
class PlatformBulkEditForm(NetBoxModelBulkEditForm):
parent = DynamicModelChoiceField(
label=_('Parent'),
queryset=Platform.objects.all(),
required=False,
)
manufacturer = DynamicModelChoiceField(
label=_('Manufacturer'),
queryset=Manufacturer.objects.all(),
@@ -697,12 +702,13 @@ class PlatformBulkEditForm(NetBoxModelBulkEditForm):
max_length=200,
required=False
)
comments = CommentField()
model = Platform
fieldsets = (
FieldSet('manufacturer', 'config_template', 'description'),
FieldSet('parent', 'manufacturer', 'config_template', 'description'),
)
nullable_fields = ('manufacturer', 'config_template', 'description')
nullable_fields = ('parent', 'manufacturer', 'config_template', 'description', 'comments')
class DeviceBulkEditForm(NetBoxModelBulkEditForm):