Skip to content

Commit

Permalink
Modify set_defaults_and_check_section!() to explicitly create and mer…
Browse files Browse the repository at this point in the history
…ge key => value sections of a Dictionary. This seems to fix the bug in the previous commit.
  • Loading branch information
mrhardman committed Aug 4, 2024
1 parent 3dd6d9c commit 68270f3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion moment_kinetics/src/input_structs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,11 @@ function set_defaults_and_check_section!(options::AbstractDict, section_name;
for (key_sym, value) kwargs
key = String(key_sym)
if !(key explicit_keys)
section[key] = value
# merge this entry to section Dict
# (creating a temporary Dict seems necessary in general,
# rather than just referencing the unexisting key in the section Dict)
section = merge(section, Dict{String,Any}(key => value))
#section[key] = value
end
end

Expand Down

0 comments on commit 68270f3

Please sign in to comment.