diff --git a/.changes/unreleased/Fixed-20230928-120910.yaml b/.changes/unreleased/Fixed-20230928-120910.yaml new file mode 100644 index 000000000..72c9dd9b4 --- /dev/null +++ b/.changes/unreleased/Fixed-20230928-120910.yaml @@ -0,0 +1,5 @@ +kind: Fixed +body: 'View a third party: avoid errors when a contact has a civility' +time: 2023-09-28T12:09:10.199359071+02:00 +custom: + Issue: "164" diff --git a/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/view.html.twig b/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/view.html.twig index f330246fc..4e7fd159d 100644 --- a/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/view.html.twig +++ b/src/Bundle/ChillThirdPartyBundle/Resources/views/ThirdParty/view.html.twig @@ -25,7 +25,7 @@
{{ 'Name'|trans }}
- {% if thirdParty.isLeaf == true %}{{ thirdParty.civility }}{% endif %} + {% if thirdParty.isLeaf == true and thirdParty.civility is not same as null %}{{ thirdParty.civility.name|localize_translatable_string }}{% endif %} {{ thirdParty.firstname ~ ' ' ~ thirdParty.name }}