Skip to content

Commit

Permalink
Fixed bug that originally did not add the .json extension to newly cr…
Browse files Browse the repository at this point in the history
…eated and saved files in the config GUI. Creating and saving new file in the config GUI now have the .json extension.
  • Loading branch information
liggett2820 committed Aug 2, 2022
1 parent ae78282 commit 5407e4d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion atef/widgets/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def save_as(self, *args, filename: Optional[str] = None, **kwargs):
filter='Json Files (*.json)',
)
try:
with open(filename+'.json', 'w') as fd:
with open(filename+'.json', 'w') as fd: ## json_extension_bug_fix location
json.dump(serialized, fd, indent=2)
except OSError:
logger.exception(f'Error saving file {filename}')
Expand Down
3 changes: 3 additions & 0 deletions demo-configs/my_filename.json.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"configs": []
}

0 comments on commit 5407e4d

Please sign in to comment.