Skip to content

Commit

Permalink
Small fix for _import_properties_from_json
Browse files Browse the repository at this point in the history
Now that set_props will issue a warning instead of throwing an exception
when it encounters a new property key, if the value is a dictionary we
need to initialize the key to an empty dictionary before recursing.
  • Loading branch information
isaacansys committed Mar 8, 2023
1 parent 05c53fa commit 5a8cf3d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pyaedt/modules/SolveSweeps.py
Original file line number Diff line number Diff line change
Expand Up @@ -887,6 +887,8 @@ def set_props(target, source):
if not isinstance(v, dict):
target[k] = v
else:
if k not in target:
target[k] = {}
set_props(target[k], v)

with open3(file_path, "r", encoding="utf-8") as f:
Expand Down

0 comments on commit 5a8cf3d

Please sign in to comment.