Update logic.py

main
Torrin Leonard 2022-12-13 20:21:12 -08:00 zatwierdzone przez GitHub
rodzic 1e144c5409
commit 2e7d4105b0
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 1 dodań i 3 usunięć

Wyświetl plik

@ -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'