diff --git a/capsul/engine/settings.py b/capsul/engine/settings.py index e50a3037..4a1b9f47 100644 --- a/capsul/engine/settings.py +++ b/capsul/engine/settings.py @@ -274,12 +274,11 @@ def export_config_dict(self, environment=None): for module in modules: mod_conf = {} for config in session.configs(module, env): - id = "%s-%s" % (config._id, env) - doc = data[session.collection_name(module)][id] - items = dict(doc._items()) - if "config_id" in items: - items["config_id"] = items["config_id"][: -len(env) - 1] - mod_conf[config._id] = items + id = f"{config._id}-{env}" + doc = data[session.collection_name(module)][id].get() + if "config_id" in doc: + doc["config_id"] = doc["config_id"][: -len(env) - 1] + mod_conf[config._id] = doc if mod_conf: env_conf[module] = mod_conf