diff --git a/backend/trcustoms/config/serializers.py b/backend/trcustoms/config/serializers.py index 639bca02..29c6a3da 100644 --- a/backend/trcustoms/config/serializers.py +++ b/backend/trcustoms/config/serializers.py @@ -46,7 +46,7 @@ class GlobalStatsSerializer(serializers.Serializer): total_walkthroughs = serializers.IntegerField() total_downloads = serializers.IntegerField() reviews = ReviewStatSerializer(many=True) - walkthroughs = WalkthroughStatSerializer(many=True) + walkthroughs = WalkthroughStatSerializer() class ConfigSerializer(serializers.Serializer): diff --git a/backend/trcustoms/config/views.py b/backend/trcustoms/config/views.py index 195f07a8..8316049e 100644 --- a/backend/trcustoms/config/views.py +++ b/backend/trcustoms/config/views.py @@ -22,13 +22,11 @@ def get_walkthrough_stats() -> dict[str, int]: qs = Level.objects.filter(is_approved=True) - return ( - dict( - video_and_text=qs.with_both_walkthroughs().count(), - video=qs.with_video_only_walkthroughs().count(), - text=qs.with_text_only_walkthroughs().count(), - none=qs.with_no_walkthroughs().count(), - ), + return dict( + video_and_text=qs.with_both_walkthroughs().count(), + video=qs.with_video_only_walkthroughs().count(), + text=qs.with_text_only_walkthroughs().count(), + none=qs.with_no_walkthroughs().count(), )