Skip to content

Commit

Permalink
Merge pull request NixOS#1410 from lukebfox/statedict-store-dict
Browse files Browse the repository at this point in the history
modify statedict: enable storing dict via json.dump
  • Loading branch information
adisbladis committed Nov 28, 2020
2 parents 8de0987 + 9a89cd5 commit faed063
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nixops/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def __setitem__(self, key: str, value: Any) -> None:
)
else:
v = value
if isinstance(value, list):
if isinstance(value, list) or isinstance(value, dict):
v = json.dumps(value, cls=nixops.util.NixopsEncoder)
c.execute(
"insert or replace into ResourceAttrs(machine, name, value) values (?, ?, ?)",
Expand Down

0 comments on commit faed063

Please sign in to comment.