Skip to content

Commit

Permalink
Combine dicts instead of mutating user environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvindeide committed Oct 23, 2024
1 parent 5fcf7d3 commit 2c94d39
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ert/config/ert_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -651,13 +651,13 @@ def forward_model_data_to_json(
itr: int = 0,
context_env: Optional[Dict[str, str]] = None,
):
if context_env is not None:
self.env_vars.update(context_env)
if context_env is None:
context_env = {}
return self._create_forward_model_json(
context=self.substitution_list,
forward_model_steps=self.forward_model_steps,
user_config_file=self.user_config_file,
env_vars=self.env_vars,
env_vars={**self.env_vars, **context_env},
run_id=run_id,
iens=iens,
itr=itr,
Expand Down

0 comments on commit 2c94d39

Please sign in to comment.