Add check on null value in template for closing motive

This commit is contained in:
Julie Lenaerts 2024-02-20 10:10:44 +01:00
parent f02c5bca13
commit 00444e1e56

View File

@ -35,9 +35,11 @@
<div class="warnings">
<div class="alert alert-danger">
<h2>{{ 'This course is closed'|trans }}</h2>
<p>
{{ 'Closing motive'|trans }} : {{ accompanyingCourse.closingMotive.name|localize_translatable_string }}
</p>
{% if accompanyingCourse.closingMotive %}
<p>
{{ 'Closing motive'|trans }} : {{ accompanyingCourse.closingMotive.name|localize_translatable_string }}
</p>
{% endif %}
</div>
</div>
</div>