fix:factory

This commit is contained in:
guo 2022-10-13 12:10:34 +08:00
parent 38f254add2
commit 1a7aae6205
2 changed files with 4 additions and 5 deletions

View File

@ -229,15 +229,13 @@ format_multilayer(Object) ->
NewV = format_value(V),
Acc#{K => NewV}
end;
(K, V, Acc) when is_binary(V) ->
case size(V) of
(K, V, Acc) ->
case size(dgiot_utils:to_binary(V)) of
0 ->
Acc;
_ ->
Acc#{K => V}
end;
(_, _, Acc) ->
Acc
end
end,
#{}, MapWhere).

View File

@ -31,6 +31,7 @@
%% Channel callback
-export([init/3, handle_init/1, handle_event/3, handle_message/2, stop/3]).
-export([get_id/2, after_handle/4, handle_data/7, get_card_data/2]).
-export([get_sub_product/1]).
%%
-channel_type(#{