25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

fix build of Parents list in #pubsub_node

This commit is contained in:
Christophe Romain 2013-08-27 13:59:29 +02:00
parent b82eeeeec9
commit 1b8876bf55

View File

@ -362,9 +362,13 @@ raw_to_node(Host, [Node, Parent, Type, NodeIdx]) ->
StdOpts, DbOpts); StdOpts, DbOpts);
_ -> [] _ -> []
end, end,
Parents = case Parent of
<<>> -> [];
_ -> [Parent]
end,
#pubsub_node{nodeid = #pubsub_node{nodeid =
{Host, Node}, {Host, Node},
parents = [Parent], parents = Parents,
id = NodeIdx, type = Type, options = Options}. id = NodeIdx, type = Type, options = Options}.
% @spec (NodeRecord) -> ok | {error, Reason} % @spec (NodeRecord) -> ok | {error, Reason}