From 025c759e443cc4eb43fc20b1f7da5520956b3b30 Mon Sep 17 00:00:00 2001 From: Brandon Liu Date: Sun, 11 Aug 2013 00:37:16 -0700 Subject: [PATCH] Fix Graph ByParent() to generate list of child images per parent image. --- graph.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/graph.go b/graph.go index 606a6833e..c54725fdb 100644 --- a/graph.go +++ b/graph.go @@ -323,9 +323,9 @@ func (graph *Graph) ByParent() (map[string][]*Image, error) { return } if children, exists := byParent[parent.ID]; exists { - byParent[parent.ID] = []*Image{image} - } else { byParent[parent.ID] = append(children, image) + } else { + byParent[parent.ID] = []*Image{image} } }) return byParent, err