From 05987223dbc49277b4ecf858f2b343f5a00306aa Mon Sep 17 00:00:00 2001 From: Paul Chavard Date: Wed, 3 Jul 2019 17:18:44 +0200 Subject: [PATCH] Avoid crashing when demarche have no service --- .../messages/_messagerie_disabled.html.haml | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/app/views/shared/dossiers/messages/_messagerie_disabled.html.haml b/app/views/shared/dossiers/messages/_messagerie_disabled.html.haml index 5b1564796..58eca1bbf 100644 --- a/app/views/shared/dossiers/messages/_messagerie_disabled.html.haml +++ b/app/views/shared/dossiers/messages/_messagerie_disabled.html.haml @@ -1,14 +1,15 @@ .card.feedback .card-title La messagerie est désormais désactivée. - %p - Pour poser une question sur ce dossier, contactez : - %p - = service.nom - %br - = service.organisme - %br - - horaires = "Horaires : #{formatted_horaires(service.horaires)}" - = simple_format(horaires) - %p - = link_to service.email, "mailto:#{service.email}" + - if service.present? + %p + Pour poser une question sur ce dossier, contactez : + %p + = service.nom + %br + = service.organisme + %br + - horaires = "Horaires : #{formatted_horaires(service.horaires)}" + = simple_format(horaires) + %p + = link_to service.email, "mailto:#{service.email}"