diff --git a/atef/widgets/config.py b/atef/widgets/config.py index 010b492e..0ef457c5 100644 --- a/atef/widgets/config.py +++ b/atef/widgets/config.py @@ -185,6 +185,8 @@ def save_as(self, *args, filename: Optional[str] = None, **kwargs): caption='Save as', filter='Json Files (*.json)', ) + if not filename.endswith('.json'): + filename += '.json' try: with open(filename, 'w') as fd: json.dump(serialized, fd, indent=2)