Always trigger SettingsUpdated event on new save
So far it was only triggered when saving via the REST API, causing some issues here and there.
This commit is contained in:
1 parent
a939130748
commit
4548be34f0
2 files changed
+7
-6
No files matched your search
@@ -548,9 +548,3 @@ def _saveSettings(data):
|
||||
logger.exception("Could not save settings for plugin {name} ({version})".format(version=plugin._plugin_version, name=plugin._plugin_name))
|
||||
|
||||
s.save()
|
||||
|
||||
payload = dict(
|
||||
config_hash=s.config_hash,
|
||||
effective_hash=s.effective_hash
|
||||
)
|
||||
eventManager().fire(Events.SETTINGS_UPDATED, payload=payload)
|
||||
@@ -1334,7 +1334,14 @@ class Settings(object):
|
||||
self._logger.exception("Error while saving config.yaml!")
|
||||
raise
|
||||
else:
|
||||
from octoprint.events import eventManager, Events
|
||||
|
||||
self.load()
|
||||
|
||||
payload = dict(config_hash=self.config_hash,
|
||||
effective_hash=self.effective_hash)
|
||||
eventManager().fire(Events.SETTINGS_UPDATED, payload=payload)
|
||||
|
||||
return True
|
||||
|
||||
##~~ Internal getter
|
||||
|
||||
Reference in new issue
Block a user