Update migrator to set correctly version for RouteS in case of NO_MORE_DATA error

This commit is contained in:
TeoV
2021-02-02 09:54:08 +02:00
committed by Dan Christian Bogos
parent 7e6074d1fa
commit 969f4bdfb7

View File

@@ -89,12 +89,12 @@ func (m *Migrator) migrateFromSupplierToRoute() (err error) {
if err := m.dmOut.DataManager().SetRouteProfile(convertSupplierToRoute(spp), true); err != nil {
return err
}
m.stats[utils.DerivedChargersV]++
m.stats[utils.Routes]++
}
if m.dryRun {
return
}
if err = m.removeSupplier(); err != nil {
if err = m.removeSupplier(); err != nil && err != utils.ErrNoMoreData {
return
}
// All done, update version with current one