From 31a850c28e68fbcea0aa77294fdc26fbeb7db5b1 Mon Sep 17 00:00:00 2001 From: kolaente Date: Mon, 10 Sep 2018 19:38:35 +0200 Subject: [PATCH] Fixed un-setting a task as done not working --- models/list_items_create_update.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/models/list_items_create_update.go b/models/list_items_create_update.go index 798f5da0e..deaf75a0e 100644 --- a/models/list_items_create_update.go +++ b/models/list_items_create_update.go @@ -45,6 +45,11 @@ func (i *ListTask) Update() (err error) { return err } + // And because a false is considered to be a null value, we need to explicitly check that case here. + if i.Done == false { + ot.Done = false + } + _, err = x.ID(i.ID).Cols("text", "description", "done", "due_date_unix", "reminder_unix").Update(ot) *i = ot return