mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-28 03:16:25 -06:00
Second attempt at a patch for #3193
This commit is contained in:
parent
90f7122fde
commit
1661af480f
19
netbox/dcim/migrations/0070_multilink_circuit.py
Normal file
19
netbox/dcim/migrations/0070_multilink_circuit.py
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# Generated by Django 2.2.2 on 2019-06-17 19:07
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('dcim', '0069_deprecate_nullablecharfield'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='interface',
|
||||||
|
name='_connected_circuittermination',
|
||||||
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='circuits.CircuitTermination'),
|
||||||
|
),
|
||||||
|
]
|
@ -1946,7 +1946,7 @@ class Interface(CableTermination, ComponentModel):
|
|||||||
blank=True,
|
blank=True,
|
||||||
null=True
|
null=True
|
||||||
)
|
)
|
||||||
_connected_circuittermination = models.OneToOneField(
|
_connected_circuittermination = models.ForeignKey(
|
||||||
to='circuits.CircuitTermination',
|
to='circuits.CircuitTermination',
|
||||||
on_delete=models.SET_NULL,
|
on_delete=models.SET_NULL,
|
||||||
related_name='+',
|
related_name='+',
|
||||||
@ -2673,8 +2673,8 @@ class Cable(ChangeLoggedModel):
|
|||||||
Traverse both ends of a cable path and return its connected endpoints. Note that one or both endpoints may be
|
Traverse both ends of a cable path and return its connected endpoints. Note that one or both endpoints may be
|
||||||
None.
|
None.
|
||||||
"""
|
"""
|
||||||
a_path = self.termination_b.trace()
|
a_path = self.termination_b.trace(follow_circuits=True)
|
||||||
b_path = self.termination_a.trace()
|
b_path = self.termination_a.trace(follow_circuits=True)
|
||||||
|
|
||||||
# Determine overall path status (connected or planned)
|
# Determine overall path status (connected or planned)
|
||||||
if self.status == CONNECTION_STATUS_PLANNED:
|
if self.status == CONNECTION_STATUS_PLANNED:
|
||||||
|
Loading…
Reference in New Issue
Block a user