Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate of #959 #961

Merged
merged 17 commits into from
Dec 1, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix serialization of pokemon sprites
  • Loading branch information
simonorono committed Nov 26, 2023
commit 6ff2c0c217ad598cfdb9980418a4cd2bd8ee900f
6 changes: 1 addition & 5 deletions pokemon_v2/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2763,11 +2763,7 @@ class Meta:

def get_pokemon_sprites(self, obj):
sprites_object = PokemonSprites.objects.get(pokemon_id=obj)
sprites_data = PokemonSpritesSerializer(
sprites_object, context=self.context
).data

return json.loads(sprites_data["sprites"])
return sprites_object.sprites

def get_pokemon_moves(self, obj):
version_objects = VersionGroup.objects.all()
Expand Down