From 6b45c3239d03bce301e43ceccc88b3856bc9e68f Mon Sep 17 00:00:00 2001 From: Sergey Bubnov Date: Sun, 5 Apr 2026 10:42:00 +0400 Subject: [PATCH 1/2] check if network_id is not None --- meshchat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshchat.py b/meshchat.py index 68ab43a..28d8ed5 100644 --- a/meshchat.py +++ b/meshchat.py @@ -1726,7 +1726,7 @@ class ReticulumMeshChat: interface_stats["transport_id"] = interface_stats["transport_id"].hex() # ensure network_id is hex as json_response can't serialize bytes - if "network_id" in interface_stats: + if "network_id" in interface_stats and interface_stats["network_id"]: interface_stats["network_id"] = interface_stats["network_id"].hex() # ensure probe_responder is hex as json_response can't serialize bytes From 3baa5cd19a92c22d1f6a2f11a53ce825e3d87453 Mon Sep 17 00:00:00 2001 From: Sergey Bubnov Date: Sun, 5 Apr 2026 17:15:39 +0400 Subject: [PATCH 2/2] explicitly check for not None value --- meshchat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshchat.py b/meshchat.py index 28d8ed5..b3207dc 100644 --- a/meshchat.py +++ b/meshchat.py @@ -1726,7 +1726,7 @@ class ReticulumMeshChat: interface_stats["transport_id"] = interface_stats["transport_id"].hex() # ensure network_id is hex as json_response can't serialize bytes - if "network_id" in interface_stats and interface_stats["network_id"]: + if "network_id" in interface_stats and interface_stats["network_id"] is not None: interface_stats["network_id"] = interface_stats["network_id"].hex() # ensure probe_responder is hex as json_response can't serialize bytes