Verified Commit ee0341ba authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Ensure we truncate summary

parent f526f0c1
......@@ -22,6 +22,7 @@ class ActorSerializer(serializers.ModelSerializer):
publicKey = serializers.JSONField(source='public_key', required=False)
manuallyApprovesFollowers = serializers.NullBooleanField(
source='manually_approves_followers', required=False)
summary = serializers.CharField(max_length=None, required=False)
class Meta:
model = models.Actor
......@@ -80,6 +81,11 @@ class ActorSerializer(serializers.ModelSerializer):
return super().save(**kwargs)
def validate_summary(self, value):
if value:
return value[:500]
class ActorWebfingerSerializer(serializers.ModelSerializer):
class Meta:
model = models.Actor
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment