Skip to content

Commit

Permalink
Merge pull request #65 from ftruzzi/fix_duplicates
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon-Becker committed May 9, 2024
2 parents b9a011c + 39b4417 commit 1613255
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def __init__(self, **args):
# initialize state
self.nonce = 0
self.all_genomes = []
self.all_combinations = []

def __tomlify(self) -> str:
"""
Expand Down Expand Up @@ -102,9 +103,10 @@ def __build_genome_metadata(self, token_id: int = 0):
else:
return self.__build_genome_metadata(token_id)

if genome_traits in self.all_genomes and not self.allow_duplicates:
if genome_traits in self.all_combinations and not self.allow_duplicates:
return self.__build_genome_metadata(token_id)
else:
self.all_combinations.append(genome_traits)
self.all_genomes.append(
{
"token_id": token_id,
Expand Down

0 comments on commit 1613255

Please sign in to comment.