fix migration for heroku

This commit is contained in:
Devin Howard 2015-10-23 22:32:09 +08:00
parent dc66ac10a9
commit 582ef63635

View file

@ -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