fix case where deleting a completed todo which belongs to a recurring todo resulted in multiple todos belonging to the recurring pattern or no todo at all

This commit is contained in:
Reinier Balt 2008-11-28 16:52:54 +01:00
parent 4a98ee5669
commit 4a78b9f97a

View file

@ -277,11 +277,11 @@ class TodosController < ApplicationController
@original_item_due = @todo.due
@context_id = @todo.context_id
@project_id = @todo.project_id
@saved = @todo.destroy
# check if this todo has a related recurring_todo. If so, create next todo
@new_recurring_todo = check_for_next_todo(@todo)
@saved = @todo.destroy
@new_recurring_todo = check_for_next_todo(@todo) if @saved
respond_to do |format|