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

Fixes #4613: Fix tag assignment on config contexts (regression from #4527)

This commit is contained in:
Jeremy Stretch
2020-05-13 10:28:48 -04:00
parent 569d4ee201
commit 1461be2004
9 changed files with 25 additions and 16 deletions

View File

@@ -2,7 +2,7 @@ from django import forms
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from mptt.forms import TreeNodeMultipleChoiceField
from taggit.forms import TagField
from taggit.forms import TagField as TagField_
from dcim.models import DeviceRole, Platform, Region, Site
from tenancy.models import Tenant, TenantGroup
@@ -142,6 +142,15 @@ class CustomFieldFilterForm(forms.Form):
# Tags
#
class TagField(TagField_):
def widget_attrs(self, widget):
# Apply the "tagfield" CSS class to trigger the special API-based selection widget for tags
return {
'class': 'tagfield'
}
class TagForm(BootstrapMixin, forms.ModelForm):
slug = SlugField()