Skip to content

Commit

Permalink
fix: wrong card art for Duos
Browse files Browse the repository at this point in the history
  • Loading branch information
beheh committed Apr 16, 2024
1 parent f2fe435 commit 5b3c720
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions twitch_hdt_ebs/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ class PubSubMessageSerializer(serializers.Serializer):
data = serializers.DictField()
version = serializers.IntegerField(default=0)

def validate_date(self, data):
# Fix wrong card art for Duos by faking it to BGT_BATTLEGROUNDS because the Twitch extension will fetch
# constructed images otherwise.
if data.get("game_type") in (65, 66, 67, 68):
data["game_type"] = 50

return data


class IntegerFieldStoredAsCharField(serializers.IntegerField):
def to_internal_value(self, data):
Expand Down

0 comments on commit 5b3c720

Please sign in to comment.