From d23c12131c64a2a2319d66067939851c6f7c4205 Mon Sep 17 00:00:00 2001 From: Graham Pengelly Date: Wed, 4 Jan 2017 10:10:20 +0000 Subject: [PATCH] Handle nil field of operation in fatality notice view Part of previous temp fix to allow publication of a pending fatality notice. More complete fix will follow. --- app/views/content_items/fatality_notice.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/content_items/fatality_notice.html.erb b/app/views/content_items/fatality_notice.html.erb index 8c498df6c..834f9afda 100644 --- a/app/views/content_items/fatality_notice.html.erb +++ b/app/views/content_items/fatality_notice.html.erb @@ -5,7 +5,7 @@
<%= render 'govuk_component/title', - context: "Operations in #{@content_item.field_of_operation.title}", + context: "Operations in #{@content_item.field_of_operation.try(:title)}", title: @content_item.title, average_title_length: "long" %>