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
1 changed files with 5 additions and 1 deletions

View File

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