Skip to content

Commit

Permalink
pm-9483 Update model attachments (#3344)
Browse files Browse the repository at this point in the history
  • Loading branch information
LRNcardozoWDF committed Jul 8, 2024
1 parent 1294cd5 commit 5e98954
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Core/Services/CipherService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public async Task ClearCacheAsync()
public async Task<Cipher> EncryptAsync(CipherView model, SymmetricCryptoKey key = null,
Cipher originalCipher = null)
{
// Adjust password history
// Adjust password history and attachments
if (model.Id != null)
{
if (originalCipher == null)
Expand Down Expand Up @@ -169,6 +169,9 @@ public async Task<Cipher> EncryptAsync(CipherView model, SymmetricCryptoKey key
}
}
}

//adjust attachments
model.Attachments = existingCipher.Attachments;
}
if (!model.PasswordHistory?.Any() ?? false)
{
Expand Down

0 comments on commit 5e98954

Please sign in to comment.