mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Converted IPAddress.interface to a GenericForeignKey
This commit is contained in:
@@ -221,6 +221,11 @@ class VMInterface(models.Model):
|
||||
max_length=100,
|
||||
blank=True
|
||||
)
|
||||
ip_addresses = GenericRelation(
|
||||
to='ipam.IPAddress',
|
||||
content_type_field='interface_type',
|
||||
object_id_field='interface_id'
|
||||
)
|
||||
|
||||
class Meta:
|
||||
ordering = ['virtual_machine', 'name']
|
||||
|
Reference in New Issue
Block a user