Commit ac9308145d79f30cd2082b68e365811880b3efb3

Authored by Bob Lail
1 parent 8ac42ca3
Exists in master and in 1 other branch production

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
... ... @@ -11,7 +11,7 @@ class LinkErrsToProblems < Mongoid::Migration
11 11 # Create a Problem for each Err
12 12 Err.all.each do |err|
13 13 app_id = err['app_id']
14   - app = app_id && App.find(app_id)
  14 + app = app_id && App.where(:_id => app_id).first
15 15 if app
16 16 err.problem = app.problems.create
17 17 err.save
... ...