mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-09 02:38:51 +01:00
fix recurring todos where new todos were not placed in tickler
there was a Date.now in the code that was not migrated to the new timezone handling
This commit is contained in:
parent
ba9a9370cc
commit
0f4a80d839
1 changed files with 2 additions and 2 deletions
|
|
@ -703,9 +703,9 @@ class TodosController < ApplicationController
|
|||
if @todo.from_recurring_todo?
|
||||
@recurring_todo = current_user.recurring_todos.find(@todo.recurring_todo_id)
|
||||
date_to_check = @todo.due.nil? ? @todo.show_from : @todo.due
|
||||
date_to_check = Date.today()-1.day if date_to_check.nil?
|
||||
date_to_check = Time.zone.now-1.day if date_to_check.nil?
|
||||
if @recurring_todo.active? && @recurring_todo.has_next_todo(date_to_check)
|
||||
date = date_to_check >= Date.today() ? date_to_check : Date.today()-1.day
|
||||
date = date_to_check >= Time.zone.now ? date_to_check : Time.zone.now-1.day
|
||||
@new_recurring_todo = create_todo_from_recurring_todo(@recurring_todo, date)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue