diff --git a/src/web/file_cmds.py b/src/web/file_cmds.py index 30b8ddf0..a39e56dd 100644 --- a/src/web/file_cmds.py +++ b/src/web/file_cmds.py @@ -225,6 +225,8 @@ def write_config(file_name): try: with open(file_name, "w") as json_file: devices = list_devices()["device_list"] + if len(devices) == 0: + return {"status": False, "msg": "No attached devices."} for device in devices: # Remove keys that we don't want to store in the file del device["status"] diff --git a/src/web/templates/index.html b/src/web/templates/index.html index 3bb5fd64..02723f75 100644 --- a/src/web/templates/index.html +++ b/src/web/templates/index.html @@ -12,7 +12,7 @@

- {% for config in config_files %} {% endfor %} @@ -103,9 +103,9 @@
- Valid Image Files + Image File Management