[#733] Fix container name

User system name instead of regular.
Set name as CID if name attribute is missed

Signed-off-by: Denis Kirillov <denis@nspcc.ru>
This commit is contained in:
Denis Kirillov 2022-10-26 16:56:01 +03:00 committed by Alex Vanin
parent 18a6aca4b4
commit 16ad0cadcb

View file

@ -55,7 +55,9 @@ func (n *layer) containerInfo(ctx context.Context, idCnr cid.ID) (*data.BucketIn
cnr := *res cnr := *res
info.Owner = cnr.Owner() info.Owner = cnr.Owner()
info.Name = container.Name(cnr) if domain := container.ReadDomain(cnr); domain.Name() != "" {
info.Name = domain.Name()
}
info.Created = container.CreatedAt(cnr) info.Created = container.CreatedAt(cnr)
info.LocationConstraint = cnr.Attribute(attributeLocationConstraint) info.LocationConstraint = cnr.Attribute(attributeLocationConstraint)