Fix favorite tasks not being updated
All checks were successful
continuous-integration/drone/pr Build is passing

This commit is contained in:
kolaente 2020-09-05 21:03:59 +02:00
parent c5dc1f91e2
commit f2e4d3c516
Signed by: konrad
GPG Key ID: F40E70337AB24C9B

View File

@ -790,6 +790,7 @@ func (t *Task) Update() (err error) {
"bucket_id", "bucket_id",
"position", "position",
"repeat_from_current_date", "repeat_from_current_date",
"is_favorite",
} }
// Make sure we have a bucket // Make sure we have a bucket
@ -898,6 +899,10 @@ func (t *Task) Update() (err error) {
if !t.RepeatFromCurrentDate { if !t.RepeatFromCurrentDate {
ot.RepeatFromCurrentDate = false ot.RepeatFromCurrentDate = false
} }
// Is Favorite
if !t.IsFavorite {
ot.IsFavorite = false
}
_, err = s.ID(t.ID). _, err = s.ID(t.ID).
Cols(colsToUpdate...). Cols(colsToUpdate...).