diff --git a/api/layer/tagging.go b/api/layer/tagging.go index a86670e..3d7159f 100644 --- a/api/layer/tagging.go +++ b/api/layer/tagging.go @@ -16,17 +16,17 @@ func (n *layer) GetObjectTagging(ctx context.Context, p *ObjectVersion) (string, tags map[string]string ) - tags = n.systemCache.GetTagging(objectTaggingCacheKey(p)) - if tags != nil { - return p.VersionID, tags, nil - } - version, err := n.getNodeVersion(ctx, p) if err != nil { return "", nil, err } p.VersionID = version.OID.EncodeToString() + tags = n.systemCache.GetTagging(objectTaggingCacheKey(p)) + if tags != nil { + return p.VersionID, tags, nil + } + tags, err = n.treeService.GetObjectTagging(ctx, p.BktInfo.CID, version) if err != nil { if errorsStd.Is(err, ErrNodeNotFound) {