Skip to content

Commit

Permalink
Merge pull request #408 from PowerGridModel/bugfix/write-to-file-open…
Browse files Browse the repository at this point in the history
…ed-in-read-mode

Bugfix/write to file opened in read mode
  • Loading branch information
mgovers committed Oct 18, 2023
2 parents 3ea5b2f + 12eb037 commit 184c2f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/power_grid_model/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def _compatibility_deprecated_export_json_data(
):
serialized_data = json_serialize(data=data, use_compact_list=compact, indent=-1 if indent is None else indent)
old_format_serialized_data = json.dumps(json.loads(serialized_data)["data"])
with open(json_file, mode="r", encoding="utf-8") as file_pointer:
with open(json_file, mode="w", encoding="utf-8") as file_pointer:
file_pointer.write(old_format_serialized_data)


Expand Down

0 comments on commit 184c2f6

Please sign in to comment.