From 3890d17c61df8e993e116c833bacacfb130d2952 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Wed, 17 Jun 2020 13:29:27 -0400 Subject: [PATCH] Clean up errant references to TagField --- netbox/dcim/forms.py | 11 +++++------ netbox/ipam/forms.py | 3 ++- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/netbox/dcim/forms.py b/netbox/dcim/forms.py index 4f5113a5e..e7cb461bf 100644 --- a/netbox/dcim/forms.py +++ b/netbox/dcim/forms.py @@ -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 diff --git a/netbox/ipam/forms.py b/netbox/ipam/forms.py index 93c1b5777..b332bf33f 100644 --- a/netbox/ipam/forms.py +++ b/netbox/ipam/forms.py @@ -687,7 +687,8 @@ class IPAddressBulkAddForm(BootstrapMixin, TenancyForm, CustomFieldModelForm): required=False, label='VRF' ) - tags = TagField( + tags = DynamicModelMultipleChoiceField( + queryset=Tag.objects.all(), required=False )