mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 15:20:13 +01:00
fix corner case for repeating todos without due date
This commit is contained in:
parent
abdac8855d
commit
18815769bb
1 changed files with 1 additions and 0 deletions
|
|
@ -689,6 +689,7 @@ 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?
|
||||
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
|
||||
@new_recurring_todo = create_todo_from_recurring_todo(@recurring_todo, date)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue