From 78acd7e0b0b80ea7bc1958a8cc62fd060f489d5a Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Sat, 20 May 2017 10:57:52 -0700 Subject: [PATCH] fix NoMethodError in mappings after_created when synapse's topic1/topic2 are nil --- app/models/mapping.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/mapping.rb b/app/models/mapping.rb index a49555a3..270d3574 100644 --- a/app/models/mapping.rb +++ b/app/models/mapping.rb @@ -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 }