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

Closes #11541: Support for limiting tag assignments by object type (#12982)

* Initial work on #11541

* Merge migrations

* Limit tags by object type during assignment

* Add tests for object type validation

* Fix form field parameters
This commit is contained in:
Jeremy Stretch
2023-06-23 14:08:14 -04:00
committed by GitHub
parent 69b818ed33
commit 1056e513b1
14 changed files with 156 additions and 27 deletions

View File

@ -210,10 +210,14 @@ class TagTable(NetBoxTable):
linkify=True
)
color = columns.ColorColumn()
object_types = columns.ContentTypesColumn()
class Meta(NetBoxTable.Meta):
model = Tag
fields = ('pk', 'id', 'name', 'items', 'slug', 'color', 'description', 'created', 'last_updated', 'actions')
fields = (
'pk', 'id', 'name', 'items', 'slug', 'color', 'description', 'object_types', 'created', 'last_updated',
'actions',
)
default_columns = ('pk', 'name', 'items', 'slug', 'color', 'description')