From a6623666371ac97f1c8cd6e474d3e7ddb7ffd172 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Trondsen?= Date: Tue, 29 May 2012 22:34:38 +0200 Subject: [PATCH] bug in prev commit --- script/upgrade_v1.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/script/upgrade_v1.rb b/script/upgrade_v1.rb index 961121d4..7f53fa35 100755 --- a/script/upgrade_v1.rb +++ b/script/upgrade_v1.rb @@ -358,8 +358,9 @@ if collection = db.collections.detect { |c| c.name == 'pages' } end # Update Norwegian locale from 'no' to 'nb' -collection = db.collections.detect {|c| c.name == 'locomotive_accounts'} -collection.update({ 'locale' => 'no' }, { '$set' => {'locale' => 'nb'}}, {:multi => true}) +if collection = db.collections.detect {|c| c.name == 'locomotive_accounts'} + collection.update({ 'locale' => 'no' }, { '$set' => {'locale' => 'nb'}}, {:multi => true}) +end # some cleaning %w(asset_collections liquid_templates delayed_backend_mongoid_jobs).each do |name|