Make sure notes always have a value, even when null #3823

This commit is contained in:
James Cole
2020-09-22 16:19:51 +02:00
parent 1624abd9ed
commit d97fd73ce5
6 changed files with 6 additions and 6 deletions

View File

@@ -122,7 +122,7 @@
<h3 class="box-title">{{ 'notes'|_ }}</h3> <h3 class="box-title">{{ 'notes'|_ }}</h3>
</div> </div>
<div class="box-body"> <div class="box-body">
{{ account.notes.first.text|markdown }} {{ account.notes.first.text|default('')|markdown }}
</div> </div>
</div> </div>
</div> </div>

View File

@@ -110,7 +110,7 @@
<h3 class="box-title">{{ 'notes'|_ }}</h3> <h3 class="box-title">{{ 'notes'|_ }}</h3>
</div> </div>
<div class="box-body"> <div class="box-body">
{{ object.data.notes|markdown }} {{ object.data.notes|default('')|markdown }}
</div> </div>
</div> </div>
{% endif %} {% endif %}

View File

@@ -28,7 +28,7 @@
</a> </a>
({{ attachment.size|filesize }}) ({{ attachment.size|filesize }})
{% if null != attachment.notes and '' != attachment.notes %} {% if null != attachment.notes and '' != attachment.notes %}
{{ attachment.notes|markdown }} {{ attachment.notes|default('')|markdown }}
{% endif %} {% endif %}
{% endif %} {% endif %}
{% if not attachment.file_exists %} {% if not attachment.file_exists %}

View File

@@ -111,7 +111,7 @@
<div class="box-header with-border"> <div class="box-header with-border">
<h3 class="box-title">{{ trans('form.notes') }}</h3> <h3 class="box-title">{{ trans('form.notes') }}</h3>
</div> </div>
<div class="box-body markdown">{{ piggy.notes|markdown }} <div class="box-body markdown">{{ piggy.notes|default('')|markdown }}
</div> </div>
</div> </div>

View File

@@ -115,7 +115,7 @@
{% if not rule.active %} {% if not rule.active %}
class="text-muted" class="text-muted"
{% endif %} {% endif %}
><br/>{{ rule.description|markdown }}</small> ><br/>{{ rule.description|default('')|markdown }}</small>
{% endif %} {% endif %}
<small><br />{% if rule.strict %}<span class="text-danger">{{ 'rule_is_strict'|_ }}</span>{% else %}<span class="text-success">{{ 'rule_is_not_strict'|_ }}</span>{% endif %}</small> <small><br />{% if rule.strict %}<span class="text-danger">{{ 'rule_is_strict'|_ }}</span>{% else %}<span class="text-success">{{ 'rule_is_not_strict'|_ }}</span>{% endif %}</small>
</td> </td>

View File

@@ -311,7 +311,7 @@
{% if null != journal.notes and '' != journal.notes %} {% if null != journal.notes and '' != journal.notes %}
<tr> <tr>
<td>{{ trans('list.notes') }}</td> <td>{{ trans('list.notes') }}</td>
<td class="markdown">{{ journal.notes|markdown }}</td> <td class="markdown">{{ journal.notes|default('')|markdown }}</td>
</tr> </tr>
{% endif %} {% endif %}
{% if journalHasMeta(journal.transaction_journal_id, 'recurring_total') and journalHasMeta(journal.transaction_journal_id, 'recurring_count') %} {% if journalHasMeta(journal.transaction_journal_id, 'recurring_total') and journalHasMeta(journal.transaction_journal_id, 'recurring_count') %}