Fix task updated timestamp not being updated in the response after updating a task
This commit is contained in:
parent
ffce9b51cc
commit
316ac0558b
1 changed files with 9 additions and 0 deletions
|
@ -917,6 +917,15 @@ func (t *Task) Update() (err error) {
|
||||||
_ = s.Rollback()
|
_ = s.Rollback()
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
// Get the task updated timestamp in a new struct - if we'd just try to put it into t which we already have, it
|
||||||
|
// would still contain the old updated date.
|
||||||
|
nt := &Task{}
|
||||||
|
_, err = s.ID(t.ID).Get(nt)
|
||||||
|
if err != nil {
|
||||||
|
_ = s.Rollback()
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
t.Updated = nt.Updated
|
||||||
|
|
||||||
err = updateListLastUpdatedS(s, &List{ID: t.ListID})
|
err = updateListLastUpdatedS(s, &List{ID: t.ListID})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue