Skip to content

Commit 621a816

Browse files
committed
Improve wrong order node detection
Fixed duplicate "Skipping node with wrong rank order" messages Made "Skipping node with wrong rank order" include more information
1 parent 7464ed1 commit 621a816

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

back_end/refresh_data.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ def list_flip(original_list):
235235
print('Finding parent nodes')
236236

237237
modified = True
238+
wrong_order_nodes = []
238239
while modified:
239240
modified = False
240241

@@ -249,7 +250,9 @@ def list_flip(original_list):
249250
continue
250251

251252
if row[1] < rows[parent_tsn][1]:
252-
print("Skipping node with wrong rank order: " + row[0][3])
253+
if row not in wrong_order_nodes:
254+
print("Skipping node with wrong rank order. Child:", row, "Parent: ", rows[parent_tsn])
255+
wrong_order_nodes.append(row)
253256
continue
254257

255258
del row[3]

0 commit comments

Comments
 (0)