added extra checks (#166)

This commit is contained in:
mattieserver
2022-09-16 16:13:32 +02:00
committed by GitHub
parent 5563e3c084
commit b4e2f2418e
+2
View File
@@ -259,12 +259,14 @@ def get_topology_data(queryset, hide_unconnected, save_coords, show_circuit, sho
if link.cable.id not in cable_ids: if link.cable.id not in cable_ids:
cable_ids[link.cable.id] = {} cable_ids[link.cable.id] = {}
else: else:
if 'B' in cable_ids[link.cable.id]:
if cable_ids[link.cable.id]['B'] is not None: if cable_ids[link.cable.id]['B'] is not None:
complete_link = True complete_link = True
elif link.cable_end == "B": elif link.cable_end == "B":
if link.cable.id not in cable_ids: if link.cable.id not in cable_ids:
cable_ids[link.cable.id] = {} cable_ids[link.cable.id] = {}
else: else:
if 'A' in cable_ids[link.cable.id]:
if cable_ids[link.cable.id]['A'] is not None: if cable_ids[link.cable.id]['A'] is not None:
complete_link = True complete_link = True
else: else: