diff --git a/twitch_hdt_ebs/serializers.py b/twitch_hdt_ebs/serializers.py index 8e593c1..4f0713d 100644 --- a/twitch_hdt_ebs/serializers.py +++ b/twitch_hdt_ebs/serializers.py @@ -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):