diff options
author | Go MAEDA <maeda@farend.jp> | 2019-06-05 09:20:23 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2019-06-05 09:20:23 +0000 |
commit | 19c713111935cba79db481af35d2347bb479c587 (patch) | |
tree | 84774beb4612af5e311db114ad14c7fdaa04275a /lib/tasks | |
parent | a7fbb4719a3c09e85e39a8de5097df8a76a0289a (diff) | |
download | redmine-19c713111935cba79db481af35d2347bb479c587.tar.gz redmine-19c713111935cba79db481af35d2347bb479c587.zip |
reminder.rake should ignore blank parameters (#31501).
Patch by Go MAEDA.
git-svn-id: http://svn.redmine.org/redmine/trunk@18226 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/tasks')
-rw-r--r-- | lib/tasks/reminder.rake | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/tasks/reminder.rake b/lib/tasks/reminder.rake index 52ac1c7a7..16c434933 100644 --- a/lib/tasks/reminder.rake +++ b/lib/tasks/reminder.rake @@ -32,11 +32,11 @@ END_DESC namespace :redmine do task :send_reminders => :environment do options = {} - options[:days] = ENV['days'].to_i if ENV['days'] - options[:project] = ENV['project'] if ENV['project'] - options[:tracker] = ENV['tracker'].to_i if ENV['tracker'] - options[:users] = (ENV['users'] || '').split(',').each(&:strip!) - options[:version] = ENV['version'] if ENV['version'] + options[:days] = ENV['days'].presence&.to_i + options[:project] = ENV['project'].presence + options[:tracker] = ENV['tracker'].presence&.to_i + options[:users] = ENV['users'].presence.to_s.split(',').each(&:strip!) + options[:version] = ENV['version'].presence Mailer.with_synched_deliveries do Mailer.reminders(options) |