1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-11-25 12:05:59 +01:00

pm-9483 Update model attachments (#3344)

This commit is contained in:
Carlos Gonçalves 2024-07-08 15:27:11 +01:00 committed by Carlos Gonçalves
parent 1294cd5c69
commit 5e98954c9e
No known key found for this signature in database
GPG Key ID: 8147F618E732EF25

View File

@ -114,7 +114,7 @@ namespace Bit.Core.Services
public async Task<Cipher> EncryptAsync(CipherView model, SymmetricCryptoKey key = null, public async Task<Cipher> EncryptAsync(CipherView model, SymmetricCryptoKey key = null,
Cipher originalCipher = null) Cipher originalCipher = null)
{ {
// Adjust password history // Adjust password history and attachments
if (model.Id != null) if (model.Id != null)
{ {
if (originalCipher == null) if (originalCipher == null)
@ -169,6 +169,9 @@ namespace Bit.Core.Services
} }
} }
} }
//adjust attachments
model.Attachments = existingCipher.Attachments;
} }
if (!model.PasswordHistory?.Any() ?? false) if (!model.PasswordHistory?.Any() ?? false)
{ {