try to fix fatal on notifications index when a topic is invalid (#1115)
* try to fix fatal on notifications index when a topic is invalid * Update index.html.erb
This commit is contained in:
parent
a6694a3f72
commit
74df2559a4
1 changed files with 6 additions and 6 deletions
|
@ -37,13 +37,13 @@
|
||||||
map = notification.notified_object.map %>
|
map = notification.notified_object.map %>
|
||||||
added topic <span class="in-bold"><%= topic.name %></span> to map <span class="in-bold"><%= map.name %></span>
|
added topic <span class="in-bold"><%= topic.name %></span> to map <span class="in-bold"><%= map.name %></span>
|
||||||
<% when TOPIC_CONNECTED_1 %>
|
<% when TOPIC_CONNECTED_1 %>
|
||||||
<% topic1 = notification.notified_object.topic1
|
<% topic1 = notification.notified_object&.topic1 %>
|
||||||
topic2 = notification.notified_object.topic2 %>
|
<% topic2 = notification.notified_object&.topic2 %>
|
||||||
connected <span class="in-bold"><%= topic1.name %></span> to <span class="in-bold"><%= topic2.name %></span>
|
connected <span class="in-bold"><%= topic1&.name %></span> to <span class="in-bold"><%= topic2&.name %></span>
|
||||||
<% when TOPIC_CONNECTED_2 %>
|
<% when TOPIC_CONNECTED_2 %>
|
||||||
<% topic1 = notification.notified_object.topic1
|
<% topic1 = notification.notified_object&.topic1 %>
|
||||||
topic2 = notification.notified_object.topic2 %>
|
<% topic2 = notification.notified_object&.topic2 %>
|
||||||
connected <span class="in-bold"><%= topic2.name %></span> to <span class="in-bold"><%= topic1.name %></span>
|
connected <span class="in-bold"><%= topic2&.name %></span> to <span class="in-bold"><%= topic1&.name %></span>
|
||||||
<% when MESSAGE_FROM_DEVS %>
|
<% when MESSAGE_FROM_DEVS %>
|
||||||
<%= notification.subject %>
|
<%= notification.subject %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
Loading…
Reference in a new issue