From 796d1c0566ab37100ebb303029cfee418811bf45 Mon Sep 17 00:00:00 2001 From: Mashintime Date: Sun, 18 Feb 2024 15:34:10 -0500 Subject: [PATCH] Only restart modem if config is valid --- modem/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modem/server.py b/modem/server.py index 8a248150..50fe5f49 100644 --- a/modem/server.py +++ b/modem/server.py @@ -94,10 +94,10 @@ def index(): def config(): if request.method in ['POST']: set_config = app.config_manager.write(request.json) - app.modem_service.put("restart") if not set_config: response = api_response(None, 'error writing config') else: + app.modem_service.put("restart") response = api_response(set_config) return response elif request.method == 'GET':