1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Clean up errant references to TagField

This commit is contained in:
Jeremy Stretch
2020-06-17 13:29:27 -04:00
parent 2d4694e72d
commit 3890d17c61
2 changed files with 7 additions and 7 deletions

View File

@@ -2214,11 +2214,10 @@ class DeviceBulkAddComponentForm(LabeledComponentForm):
queryset=Device.objects.all(),
widget=forms.MultipleHiddenInput()
)
def clean_tags(self):
# Because we're feeding TagField data (on the bulk edit form) to another TagField (on the model form), we
# must first convert the list of tags to a string.
return ','.join(self.cleaned_data.get('tags'))
tags = DynamicModelMultipleChoiceField(
queryset=Tag.objects.all(),
required=False
)
#
@@ -2855,7 +2854,7 @@ class InterfaceCreateForm(InterfaceCommonForm, LabeledComponentForm):
class InterfaceBulkCreateForm(
form_from_model(Interface, ['type', 'enabled', 'mtu', 'mgmt_only', 'description', 'tags']),
form_from_model(Interface, ['type', 'enabled', 'mtu', 'mgmt_only', 'description']),
DeviceBulkAddComponentForm
):
pass