From 4b3c6f8330f2cba989f53d0b528a6963b82234cb Mon Sep 17 00:00:00 2001 From: firest Date: Wed, 13 Mar 2024 11:28:07 +0800 Subject: [PATCH] fix(iotdb): Fix function_clause when the convert value is null --- apps/emqx_bridge_iotdb/src/emqx_bridge_iotdb_connector.erl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/emqx_bridge_iotdb/src/emqx_bridge_iotdb_connector.erl b/apps/emqx_bridge_iotdb/src/emqx_bridge_iotdb_connector.erl index 58fd66fe1..612b5e10b 100644 --- a/apps/emqx_bridge_iotdb/src/emqx_bridge_iotdb_connector.erl +++ b/apps/emqx_bridge_iotdb/src/emqx_bridge_iotdb_connector.erl @@ -544,6 +544,8 @@ convert_int(Str) when is_binary(Str) -> _:_ -> convert_int(binary_to_float(Str)) end; +convert_int(null) -> + null; convert_int(undefined) -> null. @@ -556,6 +558,8 @@ convert_float(Str) when is_binary(Str) -> _:_ -> convert_float(binary_to_integer(Str)) end; +convert_float(null) -> + null; convert_float(undefined) -> null.