From 896aad3ab00c9ccf4810c4d5196088b0b3dddb28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 20 Mar 2017 12:04:25 +0100 Subject: [PATCH] Migrate printer profile before saving as well We want to make sure that externally added profiles are up to current format. --- src/octoprint/printer/profile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/octoprint/printer/profile.py b/src/octoprint/printer/profile.py index fb8f8980..f276fcb2 100644 --- a/src/octoprint/printer/profile.py +++ b/src/octoprint/printer/profile.py @@ -369,6 +369,7 @@ class PrinterProfileManager(object): return profile def _save_to_path(self, path, profile, allow_overwrite=False): + self._migrate_profile(profile) validated_profile = self._ensure_valid_profile(profile) if not validated_profile: raise InvalidProfileError()