mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix Graph ByParent() to generate list of child images per parent image.
This commit is contained in:
parent
940d58806c
commit
025c759e44
1 changed files with 2 additions and 2 deletions
4
graph.go
4
graph.go
|
@ -323,9 +323,9 @@ func (graph *Graph) ByParent() (map[string][]*Image, error) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if children, exists := byParent[parent.ID]; exists {
|
if children, exists := byParent[parent.ID]; exists {
|
||||||
byParent[parent.ID] = []*Image{image}
|
|
||||||
} else {
|
|
||||||
byParent[parent.ID] = append(children, image)
|
byParent[parent.ID] = append(children, image)
|
||||||
|
} else {
|
||||||
|
byParent[parent.ID] = []*Image{image}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
return byParent, err
|
return byParent, err
|
||||||
|
|
Loading…
Add table
Reference in a new issue