Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jovuit
funkwhale
Commits
677a5dcf
Unverified
Commit
677a5dcf
authored
Apr 22, 2020
by
Agate
💬
Browse files
Fixed broken channel save when description is too long
parent
fdeb5ef8
Changes
2
Hide whitespace changes
Inline
Side-by-side
api/funkwhale_api/audio/serializers.py
View file @
677a5dcf
...
...
@@ -203,8 +203,6 @@ class ChannelUpdateSerializer(serializers.Serializer):
description_obj
=
common_utils
.
attach_content
(
obj
.
artist
,
"description"
,
validated_data
[
"description"
]
)
if
description_obj
:
actor_update_fields
.
append
((
"summary"
,
description_obj
.
rendered
))
if
"name"
in
validated_data
:
actor_update_fields
.
append
((
"name"
,
validated_data
[
"name"
]))
...
...
api/tests/audio/test_serializers.py
View file @
677a5dcf
...
...
@@ -184,9 +184,6 @@ def test_channel_serializer_update(factories, mocker):
sorted
(
channel
.
artist
.
tagged_items
.
values_list
(
"tag__name"
,
flat
=
True
))
==
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
.
content_type
==
"text/markdown"
assert
channel
.
actor
.
name
==
data
[
"name"
]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment