From ac9308145d79f30cd2082b68e365811880b3efb3 Mon Sep 17 00:00:00 2001 From: Bob Lail Date: Thu, 8 Sep 2011 21:23:32 -0500 Subject: [PATCH] use App.where rather than App.find: don't throw an exception if app can't be found --- db/migrate/20110905134638_link_errs_to_problems.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/migrate/20110905134638_link_errs_to_problems.rb b/db/migrate/20110905134638_link_errs_to_problems.rb index b81fa77..2b3da27 100644 --- a/db/migrate/20110905134638_link_errs_to_problems.rb +++ b/db/migrate/20110905134638_link_errs_to_problems.rb @@ -11,7 +11,7 @@ class LinkErrsToProblems < Mongoid::Migration # Create a Problem for each Err Err.all.each do |err| app_id = err['app_id'] - app = app_id && App.find(app_id) + app = app_id && App.where(:_id => app_id).first if app err.problem = app.problems.create err.save -- libgit2 0.21.2