Skip to content

Commit ce34671

Browse files
committed
Added a check to make sure ancestors are unique in lineages
1 parent 68b7619 commit ce34671

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/messes/convert/mwtab_functions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ def create_sample_lineages(input_json: dict, entity_table_name: str="entity", pa
4343
parents = next_parents
4444
next_parents = []
4545
for parent_name in parents:
46-
ancestors.append(parent_name)
46+
if parent_name not in ancestors:
47+
ancestors.append(parent_name)
4748
if parent_name not in input_json[entity_table_name]:
4849
print("Error: The parent entity, \"" + parent_name + "\", pulled from the entity \"" + entity_name + \
4950
"\" in the \"" + entity_table_name + "\" table is not in the \"" + entity_table_name + "\" table. " +\

0 commit comments

Comments
 (0)