added extra checks (#166)
This commit is contained in:
@@ -259,14 +259,16 @@ 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 cable_ids[link.cable.id]['B'] is not None:
|
if 'B' in cable_ids[link.cable.id]:
|
||||||
complete_link = True
|
if cable_ids[link.cable.id]['B'] is not None:
|
||||||
|
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 cable_ids[link.cable.id]['A'] is not None:
|
if 'A' in cable_ids[link.cable.id]:
|
||||||
complete_link = True
|
if cable_ids[link.cable.id]['A'] is not None:
|
||||||
|
complete_link = True
|
||||||
else:
|
else:
|
||||||
print("Unkown cable end")
|
print("Unkown cable end")
|
||||||
cable_ids[link.cable.id][link.cable_end] = link
|
cable_ids[link.cable.id][link.cable_end] = link
|
||||||
|
|||||||
Reference in New Issue
Block a user