From 2e7d4105b08ce3d356525ea5f0492bf02477f2eb Mon Sep 17 00:00:00 2001 From: Torrin Leonard <82110564+torrinworx@users.noreply.github.com> Date: Tue, 13 Dec 2022 20:21:12 -0800 Subject: [PATCH] Update logic.py --- main/logic.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/main/logic.py b/main/logic.py index d8c631d..2a8d7f3 100644 --- a/main/logic.py +++ b/main/logic.py @@ -41,7 +41,6 @@ def apply_rules_to_dna(hierarchy, deconstructed_dna, if_dict, result_dict, resul # Check if Variants in if_dict are in deconstructed_dna, if so return if_list_selected = True: if_list_selected = False for attribute_index, a in enumerate(deconstructed_dna): - attribute_index = deconstructed_dna.index(a) attribute = list(hierarchy.keys())[attribute_index] for b in hierarchy[attribute]: @@ -53,8 +52,7 @@ def apply_rules_to_dna(hierarchy, deconstructed_dna, if_dict, result_dict, resul if_list_selected = True # Apply changes in accordance to Variants in 'result_dict' and 'if_list_selected' bool above: - for a in deconstructed_dna: - attribute_index = deconstructed_dna.index(a) + for attribute_index, a in enumerate(deconstructed_dna): attribute = list(hierarchy.keys())[attribute_index] if attribute in result_dict: # Check if Attribute from DNA is in 'result_dict'