1
0

Use db sessions for task-related things (#621)

Use db sessions for task-related things

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/621
This commit is contained in:
konrad
2020-08-01 16:54:38 +00:00
parent 0ba6ae7a18
commit e4539ef232
7 changed files with 109 additions and 45 deletions

View File

@ -93,7 +93,7 @@ func (bt *BulkTask) Update() (err error) {
updateDone(oldtask, &bt.Task)
// Update the assignees
if err := oldtask.updateTaskAssignees(bt.Assignees); err != nil {
if err := oldtask.updateTaskAssignees(sess, bt.Assignees); err != nil {
return err
}
@ -121,7 +121,8 @@ func (bt *BulkTask) Update() (err error) {
"end_date").
Update(oldtask)
if err != nil {
return sess.Rollback()
_ = sess.Rollback()
return err
}
}