Also upgrade definition_changes and user

Because these files share their version numbers with quality changes.

Contributes to issue CURA-5054.
This commit is contained in:
Ghostkeeper 2018-03-09 16:21:42 +01:00
parent d8a066c1e7
commit cf21e7c74b
No known key found for this signature in database
GPG key ID: 5252B696FB5E7C7A
2 changed files with 24 additions and 1 deletions

View file

@ -74,6 +74,19 @@ class VersionUpgrade32to33(VersionUpgrade):
setting_version = int(parser.get("metadata", "setting_version", fallback = 0))
return format_version * 1000000 + setting_version
## Upgrades non-quality-changes instance containers to have the new version
# number.
def upgradeInstanceContainer(self, serialized, filename):
parser = configparser.ConfigParser(interpolation = None)
parser.read_string(serialized)
#Update version number.
parser["general"]["version"] = "3"
result = io.StringIO()
parser.write(result)
return [filename], [result.getvalue()]
## Upgrades a quality changes container to the new format.
def upgradeQualityChanges(self, serialized, filename):
parser = configparser.ConfigParser(interpolation = None)