From 16ad0cadcb587291bb876575d49294b2fe7e903a Mon Sep 17 00:00:00 2001 From: Denis Kirillov Date: Wed, 26 Oct 2022 16:56:01 +0300 Subject: [PATCH] [#733] Fix container name User system name instead of regular. Set name as CID if name attribute is missed Signed-off-by: Denis Kirillov --- api/layer/container.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/layer/container.go b/api/layer/container.go index f70bb48af..f7de8d1f4 100644 --- a/api/layer/container.go +++ b/api/layer/container.go @@ -55,7 +55,9 @@ func (n *layer) containerInfo(ctx context.Context, idCnr cid.ID) (*data.BucketIn cnr := *res 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.LocationConstraint = cnr.Attribute(attributeLocationConstraint)