Skip to content

Commit

Permalink
Improve wrong order node detection
Browse files Browse the repository at this point in the history
Fixed duplicate "Skipping node with wrong rank order" messages
Made "Skipping node with wrong rank order" include more information
  • Loading branch information
maxpatiiuk committed Mar 25, 2023
1 parent 7464ed1 commit 621a816
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion back_end/refresh_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ def list_flip(original_list):
print('Finding parent nodes')

modified = True
wrong_order_nodes = []
while modified:
modified = False

Expand All @@ -249,7 +250,9 @@ def list_flip(original_list):
continue

if row[1] < rows[parent_tsn][1]:
print("Skipping node with wrong rank order: " + row[0][3])
if row not in wrong_order_nodes:
print("Skipping node with wrong rank order. Child:", row, "Parent: ", rows[parent_tsn])
wrong_order_nodes.append(row)
continue

del row[3]
Expand Down

0 comments on commit 621a816

Please sign in to comment.