From: Christophe Romain Date: Wed, 25 Oct 2017 13:40:42 +0000 (+0200) Subject: Allow dynamic node options on sql backends X-Git-Tag: 17.11~108 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3162ec0d666da6acc6d19862b57a16caf5944fa3;p=ejabberd Allow dynamic node options on sql backends --- diff --git a/src/nodetree_tree_sql.erl b/src/nodetree_tree_sql.erl index 3af035f6c..0b05a885e 100644 --- a/src/nodetree_tree_sql.erl +++ b/src/nodetree_tree_sql.erl @@ -287,7 +287,7 @@ raw_to_node(Host, {Node, Parent, Type, Nidx}) -> Module = misc:binary_to_atom(<<"node_", Type/binary, "_sql">>), StdOpts = Module:options(), lists:foldl(fun ({Key, Value}, Acc) -> - lists:keyreplace(Key, 1, Acc, {Key, Value}) + lists:keystore(Key, 1, Acc, {Key, Value}) end, StdOpts, DbOpts); _ ->