From e4877d18b0ca58333dd3390f846e5e5c5bcb6a26 Mon Sep 17 00:00:00 2001 From: anlicheng <244108715@qq.com> Date: Wed, 11 Sep 2024 17:38:14 +0800 Subject: [PATCH] fix --- apps/iot/src/endpoint/iot_jinzhi_endpoint.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/iot/src/endpoint/iot_jinzhi_endpoint.erl b/apps/iot/src/endpoint/iot_jinzhi_endpoint.erl index 14c89c9..0299f11 100644 --- a/apps/iot/src/endpoint/iot_jinzhi_endpoint.erl +++ b/apps/iot/src/endpoint/iot_jinzhi_endpoint.erl @@ -196,7 +196,8 @@ format_event(LocationCode, DynamicLocationCode, EventType, #{<<"event_code">> := true -> Len = length(FakeLocationCodes), RandomIndex = rand:uniform(Len), - lists:nth(RandomIndex, FakeLocationCodes); + Code = lists:nth(RandomIndex, FakeLocationCodes), + list_to_binary(Code); false -> LocationCode end,