From ba118f7a9cc3adb7265c91e16cdd514081cfe9a3 Mon Sep 17 00:00:00 2001 From: liamcottle Date: Sun, 2 Feb 2025 23:56:55 +1300 Subject: [PATCH] allow vport 0 --- meshchat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshchat.py b/meshchat.py index 141f441..4e616c3 100644 --- a/meshchat.py +++ b/meshchat.py @@ -660,7 +660,7 @@ class ReticulumMeshChat: # ensure required fields for sub-interface provided required_subinterface_fields = ["name", "frequency", "bandwidth", "txpower", "spreadingfactor", "codingrate", "vport"] - missing_fields = [field for field in required_subinterface_fields if not sub_interface.get(field)] + missing_fields = [field for field in required_subinterface_fields if field not in sub_interface or sub_interface.get(field) == ""] if missing_fields: return web.json_response({ "message": f"Sub-interface {idx + 1} is missing required field(s): {', '.join(missing_fields)}"