Fixed insert_chromosome

This commit is contained in:
SimpleArt
2020-11-19 09:52:31 -05:00
parent 8eb436d6a5
commit d3174a9c8a

View File

@ -52,7 +52,7 @@ class SQL_Database:
""" Insert one chromosome into the database"""
# Structure the insert data
db_chromosome = (generation, chromosome.fitness, '[chromosome]')
db_chromosome = (generation, chromosome.fitness, repr(chromosome))
# Create sql query structure
sql = ''' INSERT INTO data(generation, fitness, chromosome)
@ -135,6 +135,7 @@ class SQL_Database:
return sql
def insert_config(self,ga):
"""Insert the configuration attributes into the config."""