migrator fix

This commit is contained in:
Radu Ioan Fericean
2015-11-17 15:59:18 +02:00
parent 312ea32383
commit 578954eec5

View File

@@ -133,7 +133,7 @@ func (mig MigratorRC8) migrateAccounts() error {
newAccounts := make([]*engine.Account, 0)
var migratedKeys []string
// get existing accounts
for keyIndex, key := range keys {
for _, key := range keys {
log.Printf("Migrating account: %s...", key)
values, err := mig.db.Cmd("GET", key).Bytes()
if err != nil {
@@ -250,7 +250,7 @@ func (mig MigratorRC8) migrateAccounts() error {
}
}
newAcc.InitCounters()
newAccounts[keyIndex] = newAcc
newAccounts = append(newAccounts, newAcc)
migratedKeys = append(migratedKeys, key)
}
// write data back