From 1b8876bf555a36baf60b8819542f522f7ed7b691 Mon Sep 17 00:00:00 2001 From: Christophe Romain Date: Tue, 27 Aug 2013 13:59:29 +0200 Subject: [PATCH] fix build of Parents list in #pubsub_node --- src/nodetree_tree_odbc.erl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/nodetree_tree_odbc.erl b/src/nodetree_tree_odbc.erl index 469be35d5..1cc45cfb5 100644 --- a/src/nodetree_tree_odbc.erl +++ b/src/nodetree_tree_odbc.erl @@ -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}