fix(rule-engine): add format space

This commit is contained in:
wwhai 2021-01-27 23:14:45 +08:00 committed by Zaiming Shi
parent 689b530b4f
commit b5c435e211
1 changed files with 2 additions and 2 deletions

View File

@ -251,7 +251,7 @@ update_resource(ResId, NewParams) ->
lists:foreach(fun(#rule{id = RuleId, enabled = Enabled, actions = Actions}) ->
lists:foreach(
fun (#action_instance{args = #{<<"$resource">> := ResId1}})
when ResId =:= ResId1, Enabled == true ->
when ResId =:= ResId1, Enabled =:= true ->
throw({dependency_exists, RuleId});
(_) -> ok
end, Actions)
@ -286,7 +286,7 @@ do_update_resource_check(Id, NewParams) ->
{error, not_found}
end.
do_update_resource(#{id := Id, type := Type, description:= NewDescription, config:= NewConfig}) ->
do_update_resource(#{id := Id, type := Type, description := NewDescription, config := NewConfig}) ->
case emqx_rule_registry:find_resource_type(Type) of
{ok, #resource_type{on_create = {Module, Create},
params_spec = ParamSpec}} ->