aboutsummaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
authorLuc Donnet2018-03-12 16:49:47 +0100
committerLuc Donnet2018-03-12 16:50:09 +0100
commit921d23bca18fec64fd40b393e1e63bfea3184506 (patch)
treef67d6adcb5de5d436492305f5c1623c7fdd17c4f /db
parent32244ec2195eff67d1e6abca90db2657234a37bb (diff)
downloadchouette-core-921d23bca18fec64fd40b393e1e63bfea3184506.tar.bz2
Fix migration 20180306152953_update_imports_names with compact Refs #6133 @1
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20180306152953_update_imports_names.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/db/migrate/20180306152953_update_imports_names.rb b/db/migrate/20180306152953_update_imports_names.rb
index 42129a580..fc57ff849 100644
--- a/db/migrate/20180306152953_update_imports_names.rb
+++ b/db/migrate/20180306152953_update_imports_names.rb
@@ -5,7 +5,7 @@ class UpdateImportsNames < ActiveRecord::Migration
Import::Base.where(type: type).update_all type: "Import::#{type.gsub 'Import', ''}"
end
- Import::Base.all.pluck(:parent_type).uniq.each do |type|
+ Import::Base.all.pluck(:parent_type).uniq.compact.each do |type|
next if type =~ /^Import/
Import::Base.where(parent_type: type).update_all parent_type: "Import::#{type.gsub 'Import', ''}"
end