From d8ab1b479952e2b32c5aca05f22d77f2ed7f0137 Mon Sep 17 00:00:00 2001 From: Denis Kirillov Date: Wed, 8 Jun 2022 15:33:00 +0300 Subject: [PATCH] [#520] Fix saving two lock types simultaneously Signed-off-by: Denis Kirillov --- internal/neofs/tree.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/neofs/tree.go b/internal/neofs/tree.go index 32cf9b0a..47f31f18 100644 --- a/internal/neofs/tree.go +++ b/internal/neofs/tree.go @@ -907,7 +907,8 @@ func (c *TreeClient) PutLock(ctx context.Context, cnrID *cid.ID, nodeID uint64, if lock.LegalHoldOID != nil { meta[legalHoldOIDKV] = lock.LegalHoldOID.EncodeToString() - } else if lock.RetentionOID != nil { + } + if lock.RetentionOID != nil { meta[retentionOIDKV] = lock.RetentionOID.EncodeToString() meta[untilDateKV] = lock.UntilDate if lock.IsCompliance {