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:
parent
2188c7a79d
commit
cbfd0e63ed
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue