Make check_tickler's conversion of Deferred actions to Immediate ones bypass validation. Fixes #329

git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@287 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
lukemelia 2006-07-21 03:22:57 +00:00
parent 229ee47743
commit 89802e7e19

View file

@ -255,13 +255,11 @@ class TodoController < ApplicationController
self.init
now = Date.today()
@due_tickles = @user.todos.find(:all, :conditions => ['type = ? AND (show_from < ? OR show_from = ?)', "Deferred", now, now ], :order => "show_from ASC")
unless @due_tickles.empty?
# Change the due tickles to type "Immediate"
@due_tickles.each do |t|
t[:type] = "Immediate"
t.show_from = nil
t.save
end
# Change the due tickles to type "Immediate"
@due_tickles.each do |t|
t[:type] = "Immediate"
t.show_from = nil
t.save_with_validation(false)
end
end