mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-23 04:22:01 -06:00
Fix assigned_object field
This commit is contained in:
parent
6cb31a274f
commit
e76b1f1daa
@ -23,6 +23,11 @@ class Migration(migrations.Migration):
|
|||||||
old_name='interface',
|
old_name='interface',
|
||||||
new_name='assigned_object_id',
|
new_name='assigned_object_id',
|
||||||
),
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='ipaddress',
|
||||||
|
name='assigned_object_id',
|
||||||
|
field=models.PositiveIntegerField(blank=True, null=True),
|
||||||
|
),
|
||||||
migrations.AddField(
|
migrations.AddField(
|
||||||
model_name='ipaddress',
|
model_name='ipaddress',
|
||||||
name='assigned_object_type',
|
name='assigned_object_type',
|
||||||
|
@ -615,10 +615,7 @@ class IPAddress(ChangeLoggedModel, CustomFieldModel):
|
|||||||
blank=True,
|
blank=True,
|
||||||
null=True
|
null=True
|
||||||
)
|
)
|
||||||
assigned_object_id = models.ForeignKey(
|
assigned_object_id = models.PositiveIntegerField(
|
||||||
to='dcim.Interface',
|
|
||||||
on_delete=models.CASCADE,
|
|
||||||
related_name='ip_addresses',
|
|
||||||
blank=True,
|
blank=True,
|
||||||
null=True
|
null=True
|
||||||
)
|
)
|
||||||
@ -660,7 +657,7 @@ class IPAddress(ChangeLoggedModel, CustomFieldModel):
|
|||||||
'dns_name', 'description',
|
'dns_name', 'description',
|
||||||
]
|
]
|
||||||
clone_fields = [
|
clone_fields = [
|
||||||
'vrf', 'tenant', 'status', 'role', 'description', 'interface',
|
'vrf', 'tenant', 'status', 'role', 'description',
|
||||||
]
|
]
|
||||||
|
|
||||||
STATUS_CLASS_MAP = {
|
STATUS_CLASS_MAP = {
|
||||||
|
Loading…
Reference in New Issue
Block a user