From c49024bf7b4ae31a14b7c908a86fb0782bfca178 Mon Sep 17 00:00:00 2001 From: Manuel Meurer Date: Fri, 4 Jan 2013 18:24:58 +0100 Subject: [PATCH] No need to check for presence in "extract backtraces" migration --- db/migrate/20121003223358_extract_backtraces.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/migrate/20121003223358_extract_backtraces.rb b/db/migrate/20121003223358_extract_backtraces.rb index 484149f..b6ab319 100644 --- a/db/migrate/20121003223358_extract_backtraces.rb +++ b/db/migrate/20121003223358_extract_backtraces.rb @@ -2,7 +2,7 @@ class ExtractBacktraces < Mongoid::Migration def self.up say "It could take long time (hours if you have many Notices)" Notice.unscoped.all.each do |notice| - backtrace = Backtrace.find_or_create(:raw => notice['backtrace'].presence || []) + backtrace = Backtrace.find_or_create(:raw => notice['backtrace'] || []) notice.backtrace = backtrace notice['backtrace'] = nil notice.save! -- libgit2 0.21.2