Fix assigned_object field

This commit is contained in:
Jeremy Stretch 2020-06-22 13:50:14 -04:00
parent 6cb31a274f
commit e76b1f1daa
2 changed files with 7 additions and 5 deletions

View File

@ -23,6 +23,11 @@ class Migration(migrations.Migration):
old_name='interface',
new_name='assigned_object_id',
),
migrations.AlterField(
model_name='ipaddress',
name='assigned_object_id',
field=models.PositiveIntegerField(blank=True, null=True),
),
migrations.AddField(
model_name='ipaddress',
name='assigned_object_type',

View File

@ -615,10 +615,7 @@ class IPAddress(ChangeLoggedModel, CustomFieldModel):
blank=True,
null=True
)
assigned_object_id = models.ForeignKey(
to='dcim.Interface',
on_delete=models.CASCADE,
related_name='ip_addresses',
assigned_object_id = models.PositiveIntegerField(
blank=True,
null=True
)
@ -660,7 +657,7 @@ class IPAddress(ChangeLoggedModel, CustomFieldModel):
'dns_name', 'description',
]
clone_fields = [
'vrf', 'tenant', 'status', 'role', 'description', 'interface',
'vrf', 'tenant', 'status', 'role', 'description',
]
STATUS_CLASS_MAP = {