Unverified Commit 27f40e60 authored by Agate's avatar Agate 💬
Browse files

Fixed UI crash when updating avatar

parent 35e2cb24
......@@ -179,6 +179,13 @@ class UserWriteSerializer(serializers.ModelSerializer):
return obj
def to_representation(self, instance):
r = super().to_representation(instance)
r["avatar"] = common_serializers.AttachmentSerializer(
return r
class UserReadSerializer(serializers.ModelSerializer):
......@@ -319,6 +319,7 @@ def test_user_can_patch_their_own_avatar(logged_in_api_client, factories):
assert user.actor.attachment_icon == attachment
assert "avatar" in response.data
def test_creating_user_creates_actor_as_well(
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