From 582ef636358a09ff94ae672f91da5717e5e8a55e Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Fri, 23 Oct 2015 22:32:09 +0800 Subject: [PATCH] fix migration for heroku --- db/migrate/20151001024122_mapping_polymorphism.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/db/migrate/20151001024122_mapping_polymorphism.rb b/db/migrate/20151001024122_mapping_polymorphism.rb index 6ba88f7c..e41233f6 100644 --- a/db/migrate/20151001024122_mapping_polymorphism.rb +++ b/db/migrate/20151001024122_mapping_polymorphism.rb @@ -17,6 +17,7 @@ class MappingPolymorphism < ActiveRecord::Migration unless mapping.synapse_id.nil? mapping.mappable = Synapse.find(mapping.synapse_id) else + next if mapping.topic_id == 0 mapping.mappable = Topic.find(mapping.topic_id) end mapping.save