mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-03-12 01:59:34 -05:00
fix: pass pointer to xorm Update to avoid hash panic in transaction mode
In transaction mode, xorm stores the bean argument as a map key in afterUpdateBeans. Since Task contains slices and maps (unhashable types), passing a Task value causes "hash of unhashable type" panic. Passing a pointer (&ot) fixes this since pointers are always hashable.
This commit is contained in:
@@ -1382,7 +1382,7 @@ func (t *Task) updateSingleTask(s *xorm.Session, a web.Auth, fields []string) (e
|
||||
|
||||
_, err = s.ID(t.ID).
|
||||
Cols(colsToUpdate...).
|
||||
Update(ot)
|
||||
Update(&ot)
|
||||
*t = ot
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user