Add contact assignments to models

This commit is contained in:
jeremystretch
2021-10-18 15:09:57 -04:00
parent 2e78568d4d
commit f193f0d3f9
25 changed files with 256 additions and 45 deletions

View File

@@ -54,6 +54,11 @@ class Manufacturer(OrganizationalModel):
blank=True
)
# Generic relations
contacts = GenericRelation(
to='tenancy.ContactAssignment'
)
objects = RestrictedQuerySet.as_manager()
class Meta:
@@ -584,6 +589,11 @@ class Device(PrimaryModel, ConfigContextModel):
comments = models.TextField(
blank=True
)
# Generic relations
contacts = GenericRelation(
to='tenancy.ContactAssignment'
)
images = GenericRelation(
to='extras.ImageAttachment'
)