Skip to content

Commit 1613255

Browse files
authored
Merge pull request #65 from ftruzzi/fix_duplicates
2 parents b9a011c + 39b4417 commit 1613255

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/core/main.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ def __init__(self, **args):
5252
# initialize state
5353
self.nonce = 0
5454
self.all_genomes = []
55+
self.all_combinations = []
5556

5657
def __tomlify(self) -> str:
5758
"""
@@ -102,9 +103,10 @@ def __build_genome_metadata(self, token_id: int = 0):
102103
else:
103104
return self.__build_genome_metadata(token_id)
104105

105-
if genome_traits in self.all_genomes and not self.allow_duplicates:
106+
if genome_traits in self.all_combinations and not self.allow_duplicates:
106107
return self.__build_genome_metadata(token_id)
107108
else:
109+
self.all_combinations.append(genome_traits)
108110
self.all_genomes.append(
109111
{
110112
"token_id": token_id,

0 commit comments

Comments
 (0)