2
0
Fork 0
mirror of https://github.com/PokeAPI/pokeapi synced 2025-03-02 14:07:12 +00:00

Stop encoding sprites when inserting them on the database

Since the column is now jsonb, we need to stop encoding it or it gets
inserted as a string rather than a JSON object.
This commit is contained in:
Simón Oroño 2023-11-18 23:24:02 -04:00 committed by Simón Oroño
parent 218864dfbc
commit fa14336516

View file

@ -1901,7 +1901,7 @@ def _build_pokemons():
yield PokemonSprites(
id=int(info[0]),
pokemon=Pokemon.objects.get(pk=int(info[0])),
sprites=json.dumps(sprites),
sprites=sprites,
)
build_generic((PokemonSprites,), "pokemon.csv", csv_record_to_objects)