Fixed migration query

Signed-off-by: Alexey Terentyev <axifnx@gmail.com>
This commit is contained in:
Alexey Terentyev 2018-06-18 11:11:58 +03:00
parent 9141482afd
commit 613f2b5bcb
No known key found for this signature in database
GPG Key ID: 60D6C550AEEBB467

View File

@ -34,7 +34,7 @@ func reformatAndRemoveIncorrectTopics(x *xorm.Engine) (err error) {
log.Info("Validating existed topics...") log.Info("Validating existed topics...")
for start := 0; ; start += batchSize { for start := 0; ; start += batchSize {
topics = topics[:0] topics = topics[:0]
if err := x.Asc("id").Limit(batchSize, start).Find(&topics); err != nil { if err := sess.Asc("id").Limit(batchSize, start).Find(&topics); err != nil {
return err return err
} }
if len(topics) == 0 { if len(topics) == 0 {