Skip to content

Commit

Permalink
Merge pull request #366 from populse/populsedb3_pr
Browse files Browse the repository at this point in the history
capsul adaptation for populse_db
  • Loading branch information
servoz authored Dec 9, 2024
2 parents 8b57118 + 3fe4271 commit 25ebf07
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions capsul/engine/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 25ebf07

Please sign in to comment.