Fixed broken channel save when description is too long
This commit is contained in:
parent
fdeb5ef8ae
commit
677a5dcf62
|
@ -203,8 +203,6 @@ class ChannelUpdateSerializer(serializers.Serializer):
|
||||||
description_obj = common_utils.attach_content(
|
description_obj = common_utils.attach_content(
|
||||||
obj.artist, "description", validated_data["description"]
|
obj.artist, "description", validated_data["description"]
|
||||||
)
|
)
|
||||||
if description_obj:
|
|
||||||
actor_update_fields.append(("summary", description_obj.rendered))
|
|
||||||
|
|
||||||
if "name" in validated_data:
|
if "name" in validated_data:
|
||||||
actor_update_fields.append(("name", validated_data["name"]))
|
actor_update_fields.append(("name", validated_data["name"]))
|
||||||
|
|
|
@ -184,9 +184,6 @@ def test_channel_serializer_update(factories, mocker):
|
||||||
sorted(channel.artist.tagged_items.values_list("tag__name", flat=True))
|
sorted(channel.artist.tagged_items.values_list("tag__name", flat=True))
|
||||||
== data["tags"]
|
== data["tags"]
|
||||||
)
|
)
|
||||||
assert channel.actor.summary == common_utils.render_html(
|
|
||||||
data["description"]["text"], "text/markdown"
|
|
||||||
)
|
|
||||||
assert channel.artist.description.text == data["description"]["text"]
|
assert channel.artist.description.text == data["description"]["text"]
|
||||||
assert channel.artist.description.content_type == "text/markdown"
|
assert channel.artist.description.content_type == "text/markdown"
|
||||||
assert channel.actor.name == data["name"]
|
assert channel.actor.name == data["name"]
|
||||||
|
|
Loading…
Reference in New Issue