Version Upload API: Handle \n for release notes #262
@ -174,8 +174,8 @@ class ExtensionVersionSerializer(serializers.Serializer):
|
||||
|
||||
def validate_release_notes(self, value):
|
||||
r"""Make sure \n and \r are valid after sanitation."""
|
||||
if not value:
|
||||
return value
|
||||
if value is None:
|
||||
return
|
||||
dfelinto marked this conversation as resolved
Outdated
|
||||
return value.replace('\\n', '\n').replace('\\r', '\r')
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user
why not a simple
return
?To make sure if we get None we still return None, if we get "" we still return "".
I will change this so it test for None instead.