[#161] object/delete: Add address from request body to tombstone content

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
remotes/KirillovDenis/release/v0.21.1
Leonard Lyubich 2020-11-09 15:47:32 +03:00 committed by Alex Vanin
parent 3c17e871e1
commit d38633e047
1 changed files with 3 additions and 1 deletions

View File

@ -138,7 +138,7 @@ func (s *Service) getRelations(ctx context.Context, prm *Prm) ([]*objectSDK.Addr
}
} else {
childList := linking.GetChildren()
res = make([]*objectSDK.Address, 0, len(childList)+1)
res = make([]*objectSDK.Address, 0, len(childList)+2) // 1 for parent, 1 for linking
for i := range childList {
addr := objectSDK.NewAddress()
@ -155,6 +155,8 @@ func (s *Service) getRelations(ctx context.Context, prm *Prm) ([]*objectSDK.Addr
res = append(res, addr)
}
res = append(res, prm.addr)
return res, nil
}