fix NoMethodError in mappings after_created when synapse's topic1/topic2 are nil

This commit is contained in:
Devin Howard 2017-05-20 10:57:52 -07:00
parent 328c1a14f3
commit 78acd7e0b0

View file

@ -37,8 +37,8 @@ class Mapping < ApplicationRecord
'map_' + map.id.to_s,
type: 'synapseAdded',
synapse: mappable.filtered,
topic1: mappable.topic1.filtered,
topic2: mappable.topic2.filtered,
topic1: mappable.topic1&.filtered,
topic2: mappable.topic2&.filtered,
mapping_id: id
)
meta = { 'mapping_id': id }