try to fix fatal on notifications index when a topic is invalid
This commit is contained in:
parent
a6694a3f72
commit
4bd5be2154
1 changed files with 4 additions and 4 deletions
|
@ -37,12 +37,12 @@
|
|||
map = notification.notified_object.map %>
|
||||
added topic <span class="in-bold"><%= topic.name %></span> to map <span class="in-bold"><%= map.name %></span>
|
||||
<% 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 <span class="in-bold"><%= topic1.name %></span> to <span class="in-bold"><%= topic2.name %></span>
|
||||
<% 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 <span class="in-bold"><%= topic2.name %></span> to <span class="in-bold"><%= topic1.name %></span>
|
||||
<% when MESSAGE_FROM_DEVS %>
|
||||
<%= notification.subject %>
|
||||
|
|
Loading…
Add table
Reference in a new issue