mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-03 14:31:47 +01:00
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:
parent
229ee47743
commit
89802e7e19
1 changed files with 5 additions and 7 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue