diff --git a/safeeyes/plugins/healthstats/plugin.py b/safeeyes/plugins/healthstats/plugin.py index e1cae38..72324e5 100644 --- a/safeeyes/plugins/healthstats/plugin.py +++ b/safeeyes/plugins/healthstats/plugin.py @@ -55,7 +55,9 @@ def init(ctx, safeeyes_config, plugin_config): 'total_resets': 0, } - session = context['session']['plugin'].get('healthstats', {}) | defaults + # session = context['session']['plugin'].get('healthstats', {}) | defaults + session = context['session']['plugin'].get('healthstats', {}).copy() + session.update(defaults) # refactored to maintain compatibility with python3.8 on Ubuntu 20.04 LTS (dict | dict syntax was introduced in python3.9). if 'no_of_breaks' in session: # Ignore old format session. session = defaults