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:
kolaente
2026-02-24 19:43:40 +01:00
parent 2188c7a79d
commit cbfd0e63ed

View File

@@ -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