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

Set related_query_name for GenericRelations to IPAddress

This commit is contained in:
Jeremy Stretch
2020-06-22 16:27:13 -04:00
parent 40938f0c8a
commit fc2d08c407
6 changed files with 15 additions and 24 deletions

View File

@ -689,7 +689,8 @@ class Interface(CableTermination, ComponentModel, BaseInterface):
ip_addresses = GenericRelation(
to='ipam.IPAddress',
content_type_field='assigned_object_type',
object_id_field='assigned_object_id'
object_id_field='assigned_object_id',
related_query_name='interface'
)
tags = TaggableManager(through=TaggedItem)