from bluebottle.votes.models import Vote
from bluebottle.bb_accounts.serializers import UserPreviewSerializer
from rest_framework import serializers


class VoteSerializer(serializers.ModelSerializer):
    voter = UserPreviewSerializer(read_only=True)
    project = serializers.SlugRelatedField(source='project', slug_field='slug')

    class Meta:
        model = Vote
        fields = ('id', 'voter', 'project')

from bluebottle.votes.models import Vote
from bluebottle.bb_accounts.serializers import UserPreviewSerializer
from rest_framework import serializers


class VoteSerializer(serializers.ModelSerializer):
    voter = UserPreviewSerializer(read_only=True)
    project = serializers.SlugRelatedField(source='project', slug_field='slug')

    class Meta:
        model = Vote
        fields = ('id', 'voter', 'project', 'created')

Add created to votes api serializer
Add created to votes api serializer

  from bluebottle.votes.models import Vote
  from bluebottle.bb_accounts.serializers import UserPreviewSerializer
  from rest_framework import serializers
  
  
  class VoteSerializer(serializers.ModelSerializer):
      voter = UserPreviewSerializer(read_only=True)
      project = serializers.SlugRelatedField(source='project', slug_field='slug')
  
      class Meta:
          model = Vote
-         fields = ('id', 'voter', 'project')
+         fields = ('id', 'voter', 'project', 'created')
  
Add created to votes api serializer
## Code Before:
from bluebottle.votes.models import Vote
from bluebottle.bb_accounts.serializers import UserPreviewSerializer
from rest_framework import serializers


class VoteSerializer(serializers.ModelSerializer):
    voter = UserPreviewSerializer(read_only=True)
    project = serializers.SlugRelatedField(source='project', slug_field='slug')

    class Meta:
        model = Vote
        fields = ('id', 'voter', 'project')

## Instruction:
Add created to votes api serializer
## Code After:
from bluebottle.votes.models import Vote
from bluebottle.bb_accounts.serializers import UserPreviewSerializer
from rest_framework import serializers


class VoteSerializer(serializers.ModelSerializer):
    voter = UserPreviewSerializer(read_only=True)
    project = serializers.SlugRelatedField(source='project', slug_field='slug')

    class Meta:
        model = Vote
        fields = ('id', 'voter', 'project', 'created')
