Skip to content

Commit

Permalink
fix: Handle list access with string represented indices
Browse files Browse the repository at this point in the history
  • Loading branch information
alecandido committed Oct 31, 2024
1 parent 65ab5b7 commit 98c4761
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/qibolab/_core/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ def _dump_configs(obj: dict[ComponentId, Config]) -> dict[str, dict]:
def _setvalue(d: dict, path: str, val: Any):
steps = path.split(".")
current = d
for acc in steps[:-1]:
current = current[acc]
for step in steps[:-1]:
current = current[step if isinstance(current, dict) else int(step)]

current[steps[-1]] = val

Expand Down

0 comments on commit 98c4761

Please sign in to comment.