mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-25 08:46:10 -06:00
add GenericRelation for ipam.IPAddressFunction
This commit is contained in:
parent
3c82920870
commit
1167a0473e
@ -645,6 +645,9 @@ class Device(PrimaryModel, ConfigContextModel):
|
||||
images = GenericRelation(
|
||||
to='extras.ImageAttachment'
|
||||
)
|
||||
ipaddressfunctions = GenericRelation(
|
||||
to='ipam.IPAddressFunction'
|
||||
)
|
||||
|
||||
objects = ConfigContextModelQuerySet.as_manager()
|
||||
|
||||
@ -1231,6 +1234,11 @@ class VirtualDeviceContext(PrimaryModel):
|
||||
blank=True
|
||||
)
|
||||
|
||||
# Generic relation
|
||||
ipaddressfunctions = GenericRelation(
|
||||
to='ipam.IPAddressFunction'
|
||||
)
|
||||
|
||||
class Meta:
|
||||
ordering = ['name']
|
||||
constraints = (
|
||||
|
@ -124,6 +124,9 @@ class VirtualMachine(PrimaryModel, ConfigContextModel):
|
||||
contacts = GenericRelation(
|
||||
to='tenancy.ContactAssignment'
|
||||
)
|
||||
ipaddressfunctions = GenericRelation(
|
||||
to='ipam.IPAddressFunction'
|
||||
)
|
||||
|
||||
objects = ConfigContextModelQuerySet.as_manager()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user