Fix not moving its bucket when moving a task between lists

This commit is contained in:
kolaente 2020-05-03 21:33:59 +02:00
parent f0ac6e89be
commit 83cf6e191c
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 9 additions and 0 deletions

View File

@ -642,6 +642,15 @@ func (t *Task) Update() (err error) {
return
}
// If the task is being moved between lists, make sure to move the bucket as well
if ot.ListID != t.ListID {
b, err := getDefaultBucket(t.ListID)
if err != nil {
return err
}
t.BucketID = b.ID
}
// Update the labels
//
// Maybe FIXME: