Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-24 10:46:10 +01:00

update v71.go to resolve #5595 (#5613)

This commit is contained in:
Daniel Wolf 2018-12-31 08:23:03 -05:00 committed by Lunny Xiao
parent 64995bae0f
commit b46c279587

View file

@ -44,7 +44,7 @@ func addScratchHash(x *xorm.Engine) error {
const batchSize = 100
for start := 0; ; start += batchSize {
tfas := make([]*TwoFactor, 0, batchSize)
if err := x.Limit(batchSize, start).Find(&tfas); err != nil {
if err := sess.Limit(batchSize, start).Find(&tfas); err != nil {
return err
}
if len(tfas) == 0 {