Fix Graph ByParent() to generate list of child images per parent image.

Upstream-commit: 025c759e443cc4eb43fc20b1f7da5520956b3b30
Component: engine
This commit is contained in:
Brandon Liu
2013-08-11 00:37:16 -07:00
parent 871898eda4
commit c53567b672
+2 -2
View File
@@ -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