fix migration for heroku
This commit is contained in:
parent
dc66ac10a9
commit
582ef63635
1 changed files with 1 additions and 0 deletions
|
@ -17,6 +17,7 @@ class MappingPolymorphism < ActiveRecord::Migration
|
||||||
unless mapping.synapse_id.nil?
|
unless mapping.synapse_id.nil?
|
||||||
mapping.mappable = Synapse.find(mapping.synapse_id)
|
mapping.mappable = Synapse.find(mapping.synapse_id)
|
||||||
else
|
else
|
||||||
|
next if mapping.topic_id == 0
|
||||||
mapping.mappable = Topic.find(mapping.topic_id)
|
mapping.mappable = Topic.find(mapping.topic_id)
|
||||||
end
|
end
|
||||||
mapping.save
|
mapping.save
|
||||||
|
|
Loading…
Reference in a new issue