1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00
This commit is contained in:
jeremystretch
2022-07-07 12:48:44 -04:00
parent 1beb8522b9
commit 9a7f3f8c1a
17 changed files with 169 additions and 170 deletions

View File

@ -3,7 +3,7 @@ import logging
from django.db.models.signals import post_save, post_delete, pre_delete
from django.dispatch import receiver
from .choices import LinkStatusChoices
from .choices import CableEndChoices, LinkStatusChoices
from .models import Cable, CablePath, CableTermination, Device, PathEndpoint, PowerPanel, Rack, Location, VirtualChassis
from .models.cables import trace_paths
from .utils import create_cablepath, rebuild_paths
@ -83,7 +83,7 @@ def update_connected_endpoints(instance, created, raw=False, **kwargs):
a_terminations = []
b_terminations = []
for t in instance.terminations.all():
if t.cable_end == 'A':
if t.cable_end == CableEndChoices.SIDE_A:
a_terminations.append(t.termination)
else:
b_terminations.append(t.termination)