mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-24 17:38:37 -06:00
Clean up errant references to TagField
This commit is contained in:
parent
2d4694e72d
commit
3890d17c61
@ -2214,11 +2214,10 @@ class DeviceBulkAddComponentForm(LabeledComponentForm):
|
|||||||
queryset=Device.objects.all(),
|
queryset=Device.objects.all(),
|
||||||
widget=forms.MultipleHiddenInput()
|
widget=forms.MultipleHiddenInput()
|
||||||
)
|
)
|
||||||
|
tags = DynamicModelMultipleChoiceField(
|
||||||
def clean_tags(self):
|
queryset=Tag.objects.all(),
|
||||||
# Because we're feeding TagField data (on the bulk edit form) to another TagField (on the model form), we
|
required=False
|
||||||
# must first convert the list of tags to a string.
|
)
|
||||||
return ','.join(self.cleaned_data.get('tags'))
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -2855,7 +2854,7 @@ class InterfaceCreateForm(InterfaceCommonForm, LabeledComponentForm):
|
|||||||
|
|
||||||
|
|
||||||
class InterfaceBulkCreateForm(
|
class InterfaceBulkCreateForm(
|
||||||
form_from_model(Interface, ['type', 'enabled', 'mtu', 'mgmt_only', 'description', 'tags']),
|
form_from_model(Interface, ['type', 'enabled', 'mtu', 'mgmt_only', 'description']),
|
||||||
DeviceBulkAddComponentForm
|
DeviceBulkAddComponentForm
|
||||||
):
|
):
|
||||||
pass
|
pass
|
||||||
|
@ -687,7 +687,8 @@ class IPAddressBulkAddForm(BootstrapMixin, TenancyForm, CustomFieldModelForm):
|
|||||||
required=False,
|
required=False,
|
||||||
label='VRF'
|
label='VRF'
|
||||||
)
|
)
|
||||||
tags = TagField(
|
tags = DynamicModelMultipleChoiceField(
|
||||||
|
queryset=Tag.objects.all(),
|
||||||
required=False
|
required=False
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user