fix(rule-engine): add format space
This commit is contained in:
parent
689b530b4f
commit
b5c435e211
|
@ -251,7 +251,7 @@ update_resource(ResId, NewParams) ->
|
||||||
lists:foreach(fun(#rule{id = RuleId, enabled = Enabled, actions = Actions}) ->
|
lists:foreach(fun(#rule{id = RuleId, enabled = Enabled, actions = Actions}) ->
|
||||||
lists:foreach(
|
lists:foreach(
|
||||||
fun (#action_instance{args = #{<<"$resource">> := ResId1}})
|
fun (#action_instance{args = #{<<"$resource">> := ResId1}})
|
||||||
when ResId =:= ResId1, Enabled == true ->
|
when ResId =:= ResId1, Enabled =:= true ->
|
||||||
throw({dependency_exists, RuleId});
|
throw({dependency_exists, RuleId});
|
||||||
(_) -> ok
|
(_) -> ok
|
||||||
end, Actions)
|
end, Actions)
|
||||||
|
@ -286,7 +286,7 @@ do_update_resource_check(Id, NewParams) ->
|
||||||
{error, not_found}
|
{error, not_found}
|
||||||
end.
|
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
|
case emqx_rule_registry:find_resource_type(Type) of
|
||||||
{ok, #resource_type{on_create = {Module, Create},
|
{ok, #resource_type{on_create = {Module, Create},
|
||||||
params_spec = ParamSpec}} ->
|
params_spec = ParamSpec}} ->
|
||||||
|
|
Loading…
Reference in New Issue