fix(emqx_license): don't crash if an imported backup file has no license config

This commit is contained in:
Serge Tupchii 2024-05-07 13:48:04 +03:00
parent 93e31d088a
commit b869488d35
1 changed files with 3 additions and 1 deletions

View File

@ -117,7 +117,9 @@ import_config(#{<<"license">> := Config}) ->
{ok, #{root_key => license, changed => Changed1}}; {ok, #{root_key => license, changed => Changed1}};
Error -> Error ->
{error, #{root_key => license, reason => Error}} {error, #{root_key => license, reason => Error}}
end. end;
import_config(_RawConf) ->
{ok, #{root_key => license, changed => []}}.
%%------------------------------------------------------------------------------ %%------------------------------------------------------------------------------
%% emqx_config_handler callbacks %% emqx_config_handler callbacks