summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.rubocop_todo.yml1
-rw-r--r--db/migrate/20110228000100_copy_repositories_log_encoding.rb2
2 files changed, 1 insertions, 2 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index 1c9f5bff0..043c4864e 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -961,7 +961,6 @@ Rails/Presence:
- 'app/models/repository.rb'
- 'config/initializers/10-patches.rb'
- 'config/initializers/30-redmine.rb'
- - 'db/migrate/20110228000100_copy_repositories_log_encoding.rb'
- 'lib/redmine/codeset_util.rb'
- 'lib/redmine/i18n.rb'
- 'lib/redmine/scm/adapters/abstract_adapter.rb'
diff --git a/db/migrate/20110228000100_copy_repositories_log_encoding.rb b/db/migrate/20110228000100_copy_repositories_log_encoding.rb
index df9c3dca5..1648bf725 100644
--- a/db/migrate/20110228000100_copy_repositories_log_encoding.rb
+++ b/db/migrate/20110228000100_copy_repositories_log_encoding.rb
@@ -1,7 +1,7 @@
class CopyRepositoriesLogEncoding < ActiveRecord::Migration[4.2]
def self.up
encoding = Setting.commit_logs_encoding.to_s.strip
- encoding = encoding.blank? ? 'UTF-8' : encoding
+ encoding = encoding.presence || 'UTF-8'
# encoding is NULL by default
Repository.where("type IN ('Bazaar', 'Cvs', 'Darcs')").
update_all(["log_encoding = ?", encoding])