1
0
Fork 0
mirror of https://gitlab.com/SIGBUS/nyaa.git synced 2024-12-22 14:49:59 +00:00

Default description to "" in field renderer

Otherwise we get None on upload page
This commit is contained in:
TheAMM 2017-05-30 19:35:28 +03:00 committed by Alex Ingram
parent f4fb9fc065
commit 80587e02fe

View file

@ -52,7 +52,7 @@
<div role="tabpanel" class="tab-pane active" id="{{ field_name }}-tab" data-markdown-target="#{{ field_name }}-markdown-target">
{# Render this field manually, because we need to escape the inner text #}
<textarea class="form-control markdown-source" id="{{ field.id }}" name="{{ field.name }}">
{{- field.data | escape | replace('\r\n', '\n') | replace('\n', '&#10;'|safe) -}}
{{- (field.data or "") | escape | replace('\r\n', '\n') | replace('\n', '&#10;'|safe) -}}
</textarea>
{% if field.errors %}
<div class="help-block">