<commit_before>from rest_framework import serializers
from apps.core.models import PortalUser, Character

__author__ = 'mkr'


class PortalUserSerializer(serializers.ModelSerializer):
    class Meta:
        model = PortalUser
        fields = ('id', 'username', 'first_name', 'last_name', 'email', 'nick')


class CharacterSerializer(serializers.ModelSerializer):
    user = serializers.RelatedField(read_only=False)

    class Meta:
        model = Character
        fields = ('type', 'total_time', 'total_score', 'health', 'level', 'user')<commit_msg>Fix for character serializer<commit_after>from rest_framework import serializers
from apps.core.models import PortalUser, Character

__author__ = 'mkr'


class PortalUserSerializer(serializers.ModelSerializer):
    class Meta:
        model = PortalUser
        fields = ('id', 'username', 'first_name', 'last_name', 'email', 'nick')


class CharacterSerializer(serializers.ModelSerializer):
    class Meta:
        model = Character
        fields = ('type', 'total_time', 'total_score', 'health', 'level', 'user')
{'fraction_non_alphanumeric': 0.11880261927034612, 'fraction_numerical': 0.0, 'mean_word_length': 4.544041450777202, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7315093', 'n_tokens_mistral': 297, 'n_tokens_neox': 290, 'n_words': 78}