forked from TrueCloudLab/frostfs-contract
[#121] container: Catch non-existent container owner case
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
cb385c920f
commit
ea89844033
1 changed files with 4 additions and 0 deletions
|
@ -606,6 +606,10 @@ func getContainer(ctx storage.Context, cid []byte) Container {
|
|||
|
||||
func getOwnerByID(ctx storage.Context, cid []byte) []byte {
|
||||
container := getContainer(ctx, cid)
|
||||
if len(container.value) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
return ownerFromBinaryContainer(container.value)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue