From 5e98954c9e96d4ae861c7cb611dd8f24b14b7dd8 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 @@ public async Task ClearCacheAsync() 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 @@ public async Task EncryptAsync(CipherView model, SymmetricCryptoKey key } } } + + //adjust attachments + model.Attachments = existingCipher.Attachments; } if (!model.PasswordHistory?.Any() ?? false) {