mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-24 00:15:17 -06:00
Update netbox/dcim/models/cables.py
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
This commit is contained in:
parent
837811d019
commit
e0f32926bb
@ -572,7 +572,8 @@ class CablePath(models.Model):
|
|||||||
|
|
||||||
q_filter = Q()
|
q_filter = Q()
|
||||||
for lct in local_cable_terminations:
|
for lct in local_cable_terminations:
|
||||||
q_filter |= Q(cable=lct.cable, cable_end='A' if lct.cable_end == 'B' else 'B')
|
cable_end = 'A' if lct.cable_end == 'B' else 'B'
|
||||||
|
q_filter |= Q(cable=lct.cable, cable_end=cable_end)
|
||||||
|
|
||||||
assert q_filter is not Q()
|
assert q_filter is not Q()
|
||||||
remote_cable_terminations = CableTermination.objects.filter(q_filter)
|
remote_cable_terminations = CableTermination.objects.filter(q_filter)
|
||||||
|
Loading…
Reference in New Issue
Block a user