Commit 399627f3f0001372302a1a376e3121fb73c87ade
Exists in
master
and in
1 other branch
Merge pull request #334 from krautcomputing/fix_extract_backtraces_migration
Fix extract_backtraces migration, account for notices without backtrace
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
db/migrate/20121003223358_extract_backtraces.rb
... | ... | @@ -2,7 +2,7 @@ class ExtractBacktraces < Mongoid::Migration |
2 | 2 | def self.up |
3 | 3 | say "It could take long time (hours if you have many Notices)" |
4 | 4 | Notice.unscoped.all.each do |notice| |
5 | - backtrace = Backtrace.find_or_create(:raw => notice['backtrace']) | |
5 | + backtrace = Backtrace.find_or_create(:raw => notice['backtrace'] || []) | |
6 | 6 | notice.backtrace = backtrace |
7 | 7 | notice['backtrace'] = nil |
8 | 8 | notice.save! | ... | ... |