From 10e9d3eb407dbe18d90502d52a67e24a3978bff3 Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Sun, 17 Mar 2013 21:43:03 -0400 Subject: [PATCH] fixed undo on checkboxed items --- src/app/tasks.coffee | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/tasks.coffee b/src/app/tasks.coffee index a8667dc50b..f8a2852044 100644 --- a/src/app/tasks.coffee +++ b/src/app/tasks.coffee @@ -207,7 +207,11 @@ module.exports.app = (appExports, model) -> batch.startTransaction() _.each undo.stats, (val, key) -> batch.set "stats.#{key}", val taskPath = "tasks.#{undo.task.id}" - _.each undo.task, (val, key) -> batch.set "#{taskPath}.#{key}", val + _.each undo.task, (val, key) -> + if key is 'completed' + user.pass({cron:true}).set("#{taskPath}.completed",val) + else + batch.set "#{taskPath}.#{key}", val batch.commit() model.del '_undo'