diff --git a/module/config/config_updater.py b/module/config/config_updater.py index 9fa8f8381..9c92d8fa0 100644 --- a/module/config/config_updater.py +++ b/module/config/config_updater.py @@ -616,8 +616,7 @@ class ConfigUpdater: """ new = {} - def deep_load(keys): - data = deep_get(self.args, keys=keys, default={}) + for keys, data in deep_iter(self.args, depth=3): value = deep_get(old, keys=keys, default=data['value']) typ = data['type'] display = data.get('display') @@ -627,9 +626,6 @@ class ConfigUpdater: value = parse_value(value, data=data) deep_set(new, keys=keys, value=value) - for path, _ in deep_iter(self.args, depth=3): - deep_load(path) - # AzurStatsID if is_template: deep_set(new, 'Alas.DropRecord.AzurStatsID', None) diff --git a/submodule/AlasFpyBridge/module/config/config_updater.py b/submodule/AlasFpyBridge/module/config/config_updater.py index bbfd3d4ec..d7c35b341 100644 --- a/submodule/AlasFpyBridge/module/config/config_updater.py +++ b/submodule/AlasFpyBridge/module/config/config_updater.py @@ -85,23 +85,19 @@ class ConfigUpdater(config_updater.ConfigUpdater): """ new = {} - def deep_load(keys): - data = deep_get(self.args, keys=keys, default={}) + for keys, data in deep_iter(self.args, depth=3): value = deep_get(old, keys=keys, default=data["value"]) if ( - is_template - or value is None - or value == "" - or data["type"] == "lock" - or data.get("display") == "hide" + is_template + or value is None + or value == "" + or data["type"] == "lock" + or data.get("display") == "hide" ): value = data["value"] value = parse_value(value, data=data) deep_set(new, keys=keys, value=value) - for path, _ in deep_iter(self.args, depth=3): - deep_load(path) - if not is_template: new = self.config_redirect(old, new) diff --git a/submodule/AlasMaaBridge/module/config/config_updater.py b/submodule/AlasMaaBridge/module/config/config_updater.py index 21f066e13..5281e9ec5 100644 --- a/submodule/AlasMaaBridge/module/config/config_updater.py +++ b/submodule/AlasMaaBridge/module/config/config_updater.py @@ -94,17 +94,13 @@ class ConfigUpdater(config_updater.ConfigUpdater): """ new = {} - def deep_load(keys): - data = deep_get(self.args, keys=keys, default={}) + for keys, data in deep_iter(self.args, depth=3): value = deep_get(old, keys=keys, default=data['value']) if is_template or value is None or value == '' or data['type'] == 'lock' or data.get('display') == 'hide': value = data['value'] value = parse_value(value, data=data) deep_set(new, keys=keys, value=value) - for path, _ in deep_iter(self.args, depth=3): - deep_load(path) - if not is_template: new = self.config_redirect(old, new)