mirror of
https://github.com/go-gitea/gitea
synced 2024-06-03 03:46:51 +02:00
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 err
|
||||||
}
|
}
|
||||||
return committer.Commit()
|
return committer.Commit()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user