From 621a81615d930c2bdaf3bbc9702d90e92a890d14 Mon Sep 17 00:00:00 2001 From: Max Patiiuk Date: Fri, 24 Mar 2023 22:28:54 -0500 Subject: [PATCH] Improve wrong order node detection Fixed duplicate "Skipping node with wrong rank order" messages Made "Skipping node with wrong rank order" include more information --- back_end/refresh_data.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/back_end/refresh_data.py b/back_end/refresh_data.py index 95babc3..350b7b1 100644 --- a/back_end/refresh_data.py +++ b/back_end/refresh_data.py @@ -235,6 +235,7 @@ def list_flip(original_list): print('Finding parent nodes') modified = True +wrong_order_nodes = [] while modified: modified = False @@ -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]