From a88cd9fcfcddc9443881c0031598cd5363b51b1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 21 Nov 2016 13:44:26 +0100 Subject: [PATCH] Copy settings in on_settings_load so we don't mutate them --- src/octoprint/plugin/types.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/octoprint/plugin/types.py b/src/octoprint/plugin/types.py index 9ac9a162..84104ce4 100644 --- a/src/octoprint/plugin/types.py +++ b/src/octoprint/plugin/types.py @@ -828,8 +828,9 @@ class SettingsPlugin(OctoPrintPlugin): :return: the current settings of the plugin, as a dictionary """ from flask.ext.login import current_user + import copy - data = self._settings.get_all_data() + data = copy.deepcopy(self._settings.get_all_data(merged=True)) if self.config_version_key in data: del data[self.config_version_key]