From b81ce44cc7b50cb1861dc30b20d255c6a662e2b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Gon=C3=A7alves?= Date: Mon, 8 Jul 2024 15:27:11 +0100 Subject: [PATCH] pm-9483 Update model attachments (#3344) --- src/Core/Services/CipherService.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Core/Services/CipherService.cs b/src/Core/Services/CipherService.cs index f5e7a2b81..93f00dc1b 100644 --- a/src/Core/Services/CipherService.cs +++ b/src/Core/Services/CipherService.cs @@ -114,7 +114,7 @@ namespace Bit.Core.Services public async Task EncryptAsync(CipherView model, SymmetricCryptoKey key = null, Cipher originalCipher = null) { - // Adjust password history + // Adjust password history and attachments if (model.Id != null) { if (originalCipher == null) @@ -169,6 +169,9 @@ namespace Bit.Core.Services } } } + + //adjust attachments + model.Attachments = existingCipher.Attachments; } if (!model.PasswordHistory?.Any() ?? false) {