Skip to content

Commit

Permalink
SW-346 warn users not to remove laser head while the device is on reo…
Browse files Browse the repository at this point in the history
…pened to Fix migration Exception (#1357)
  • Loading branch information
khaledsherkawi authored and ahmed-mrbeam committed Sep 20, 2021
1 parent 4985548 commit 202baee
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion octoprint_mrbeam/migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def run(self):
self.VERSION_UPDATE_FORCE_FOCUS_REMINDER,
equal_ok=False,
):
self.plugin._settings.set_boolean(["focusReminder"], True).save()
self.update_focus_reminder_setting()

# migrations end

Expand Down Expand Up @@ -976,3 +976,13 @@ def update_custom_material_settings(self):
my_materials = materials(self.plugin)
for k, v in my_materials.get_custom_materials().items():
my_materials.put_custom_material(k, v)

def update_focus_reminder_setting(self):
"""
Updates the 'focusReminder' flag in settings
Enforce the flag to True so the user can see
the laser head removal warning at least once
"""
self._logger.info("start update_focus_reminder_setting")
self.plugin._settings.set_boolean(["focusReminder"], True)
self.plugin._settings.save()

0 comments on commit 202baee

Please sign in to comment.