Merge pull request #12984 from SergeTupchiy/EMQX-12255-handle-no-license-in-backup-restore
fix(emqx_license): don't crash if an imported backup file has no license config
This commit is contained in:
commit
ad9ace8d0a
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue