mirror of https://github.com/go-gitea/gitea
Fix: exec sql with session
This commit is contained in:
parent
faa0d0b76e
commit
58958074f2
|
@ -33,7 +33,7 @@ func InsertMilestones(ms ...*issues_model.Milestone) (err error) {
|
|||
}
|
||||
}
|
||||
|
||||
if _, err = db.Exec(ctx, "UPDATE `repository` SET num_milestones = num_milestones + ? WHERE id = ?", len(ms), ms[0].RepoID); err != nil {
|
||||
if _, err = sess.Exec(ctx, "UPDATE `repository` SET num_milestones = num_milestones + ? WHERE id = ?", len(ms), ms[0].RepoID); err != nil {
|
||||
return err
|
||||
}
|
||||
return committer.Commit()
|
||||
|
|
Loading…
Reference in New Issue