From 745846f7a509ac772007714d77681dc8ead4b952 Mon Sep 17 00:00:00 2001 From: Shawn Bruce Date: Sat, 2 May 2020 18:41:19 -0400 Subject: [PATCH] Fix issue with saving doSmartPreheat snippet in settings (#1) self.settings.plugins.smartpreheat won't exist without at least one setting defined. Present a dummy setting for now. --- octoprint_smartpreheat/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/octoprint_smartpreheat/__init__.py b/octoprint_smartpreheat/__init__.py index 5354a6c..77d9b62 100644 --- a/octoprint_smartpreheat/__init__.py +++ b/octoprint_smartpreheat/__init__.py @@ -57,7 +57,7 @@ def on_settings_initialized(self): self._settings.saveScript("gcode", "snippets/doSmartPreheat", u'' + script.replace("\r\n", "\n").replace("\r", "\n")) def get_settings_defaults(self): - return dict() + return dict(dummy=False) def get_template_configs(self): return [