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

Fixes #14706: Relax one-to-one mapping of tunnel termination to IP address

This commit is contained in:
Jeremy Stretch
2024-01-05 14:31:38 -05:00
parent 5223486fd8
commit e1e198ec4f
2 changed files with 22 additions and 2 deletions

View File

@ -0,0 +1,20 @@
# Generated by Django 4.2.8 on 2024-01-05 19:31
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('ipam', '0069_gfk_indexes'),
('vpn', '0002_move_l2vpn'),
]
operations = [
migrations.AlterField(
model_name='tunneltermination',
name='outside_ip',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='tunnel_terminations', to='ipam.ipaddress'),
),
]

View File

@ -129,10 +129,10 @@ class TunnelTermination(CustomFieldsMixin, CustomLinksMixin, TagsMixin, ChangeLo
ct_field='termination_type',
fk_field='termination_id'
)
outside_ip = models.OneToOneField(
outside_ip = models.ForeignKey(
to='ipam.IPAddress',
on_delete=models.PROTECT,
related_name='tunnel_termination',
related_name='tunnel_terminations',
blank=True,
null=True
)