Take Null value for gender into account and fix OnTheFly makeFetch

This commit is contained in:
2024-10-22 14:39:17 +02:00
parent 30b66d5806
commit 588f02cdf4
6 changed files with 17 additions and 13 deletions

View File

@@ -103,7 +103,7 @@
{%- endif -%}
{%- elseif person.birthdate is not null -%}
<time datetime="{{ person.birthdate|date('Y-m-d') }}" title="{{ 'Birthdate'|trans }}">
{{ 'Born the date'|trans({'gender': person.gender.genderTranslation.value,
{{ 'Born the date'|trans({'gender': person.gender ? person.gender.genderTranslation.value : 'neutral',
'birthdate': person.birthdate|format_date("medium") }) }}
</time>
{%- if options['addAge'] -%}