[FIX] core: call migration end- scripts with the previous version number
This commit is contained in:
@@ -119,7 +119,8 @@ class MigrationManager(object):
|
||||
lst.sort()
|
||||
return lst
|
||||
|
||||
parsed_installed_version = parse_version(getattr(pkg, 'load_version', pkg.installed_version) or '')
|
||||
installed_version = getattr(pkg, 'load_version', pkg.installed_version) or ''
|
||||
parsed_installed_version = parse_version(installed_version)
|
||||
current_version = parse_version(convert_version(pkg.data['version']))
|
||||
|
||||
versions = _get_migration_versions(pkg)
|
||||
@@ -156,7 +157,7 @@ class MigrationManager(object):
|
||||
except AttributeError:
|
||||
_logger.error('module %(addon)s: Each %(stage)s-migration file must have a "migrate(cr, installed_version)" function' % strfmt)
|
||||
else:
|
||||
migrate(self.cr, pkg.installed_version)
|
||||
migrate(self.cr, installed_version)
|
||||
finally:
|
||||
if fp:
|
||||
fp.close()
|
||||
|
||||
Reference in New Issue
Block a user