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:
SergeTupchiy 2024-05-07 16:05:49 +03:00 committed by GitHub
commit ad9ace8d0a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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}};
Error ->
{error, #{root_key => license, reason => Error}}
end.
end;
import_config(_RawConf) ->
{ok, #{root_key => license, changed => []}}.
%%------------------------------------------------------------------------------
%% emqx_config_handler callbacks