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
No known key found for this signature in database
GPG Key ID: B5669F9493CDE38D
6 changed files with 6 additions and 6 deletions

View File

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

View File

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

View File

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

View File

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

View File

@ -115,7 +115,7 @@
{% if not rule.active %}
class="text-muted"
{% endif %}
><br/>{{ rule.description|markdown }}</small>
><br/>{{ rule.description|default('')|markdown }}</small>
{% 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>
</td>

View File

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