reminder-rake-should-ignore-blank_param.patch

Go MAEDA, 2019-06-03 05:09

Download (926 Bytes)

View differences:

lib/tasks/reminder.rake
32 32
namespace :redmine do
33 33
  task :send_reminders => :environment do
34 34
    options = {}
35
    options[:days] = ENV['days'].to_i if ENV['days']
36
    options[:project] = ENV['project'] if ENV['project']
37
    options[:tracker] = ENV['tracker'].to_i if ENV['tracker']
38
    options[:users] = (ENV['users'] || '').split(',').each(&:strip!)
39
    options[:version] = ENV['version'] if ENV['version'] 
35
    options[:days] = ENV['days'].presence&.to_i
36
    options[:project] = ENV['project'].presence
37
    options[:tracker] = ENV['tracker'].presence&.to_i
38
    options[:users] = ENV['users'].presence.to_s.split(',').each(&:strip!)
39
    options[:version] = ENV['version'].presence
40 40

  
41 41
    Mailer.with_synched_deliveries do
42 42
      Mailer.reminders(options)