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:
@ -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'),
|
||||||
|
),
|
||||||
|
]
|
@ -129,10 +129,10 @@ class TunnelTermination(CustomFieldsMixin, CustomLinksMixin, TagsMixin, ChangeLo
|
|||||||
ct_field='termination_type',
|
ct_field='termination_type',
|
||||||
fk_field='termination_id'
|
fk_field='termination_id'
|
||||||
)
|
)
|
||||||
outside_ip = models.OneToOneField(
|
outside_ip = models.ForeignKey(
|
||||||
to='ipam.IPAddress',
|
to='ipam.IPAddress',
|
||||||
on_delete=models.PROTECT,
|
on_delete=models.PROTECT,
|
||||||
related_name='tunnel_termination',
|
related_name='tunnel_terminations',
|
||||||
blank=True,
|
blank=True,
|
||||||
null=True
|
null=True
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user