Only show stack IDs for each account

This commit is contained in:
Tanner Collin 2021-07-17 22:27:47 +00:00
parent 7386cb52e0
commit 0f52e73ba7

View File

@ -20,7 +20,8 @@ class StackSerializer(serializers.ModelSerializer):
fields = '__all__' fields = '__all__'
class AccountSerializer(serializers.ModelSerializer): class AccountSerializer(serializers.ModelSerializer):
stacks = StackSerializer(many=True, read_only=True) stacks = serializers.PrimaryKeyRelatedField(many=True, read_only=True)
users = serializers.SlugRelatedField(many=True, read_only=True, slug_field='username')
class Meta: class Meta:
model = models.Account model = models.Account