aboutsummaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
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