diff --git a/app/views/notifications/index.html.erb b/app/views/notifications/index.html.erb index e965f481..291da846 100644 --- a/app/views/notifications/index.html.erb +++ b/app/views/notifications/index.html.erb @@ -37,12 +37,12 @@ map = notification.notified_object.map %> added topic <%= topic.name %> to map <%= map.name %> <% when TOPIC_CONNECTED_1 %> - <% topic1 = notification.notified_object.topic1 - topic2 = notification.notified_object.topic2 %> + <% topic1 = notification.notified_object&.topic1 %> + <% topic2 = notification.notified_object&.topic2 %> connected <%= topic1.name %> to <%= topic2.name %> <% when TOPIC_CONNECTED_2 %> - <% topic1 = notification.notified_object.topic1 - topic2 = notification.notified_object.topic2 %> + <% topic1 = notification.notified_object&.topic1 %> + <% topic2 = notification.notified_object&.topic2 %> connected <%= topic2.name %> to <%= topic1.name %> <% when MESSAGE_FROM_DEVS %> <%= notification.subject %>