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

#1503: Initial work on generic secret assignments (WIP)

This commit is contained in:
Jeremy Stretch
2020-09-18 14:51:09 -04:00
parent 0cc2a6b2cf
commit ec095e58b7
7 changed files with 96 additions and 38 deletions

View File

@@ -582,6 +582,12 @@ class Device(ChangeLoggedModel, ConfigContextModel, CustomFieldModel):
images = GenericRelation(
to='extras.ImageAttachment'
)
secrets = GenericRelation(
to='secrets.Secret',
content_type_field='assigned_object_type',
object_id_field='assigned_object_id',
related_query_name='device'
)
tags = TaggableManager(through=TaggedItem)
objects = RestrictedQuerySet.as_manager()