mirror of
https://github.com/bitwarden/server.git
synced 2025-05-29 23:34:53 -05:00
Revert change on EF CipherRepository (#2426)
This commit is contained in:
parent
68bb545353
commit
d8834793b5
@ -562,7 +562,8 @@ public class CipherRepository : Repository<Core.Entities.Cipher, Cipher, Guid>,
|
|||||||
var attachments = string.IsNullOrWhiteSpace(cipher.Attachments) ?
|
var attachments = string.IsNullOrWhiteSpace(cipher.Attachments) ?
|
||||||
new Dictionary<string, CipherAttachment.MetaData>() :
|
new Dictionary<string, CipherAttachment.MetaData>() :
|
||||||
JsonConvert.DeserializeObject<Dictionary<string, CipherAttachment.MetaData>>(cipher.Attachments);
|
JsonConvert.DeserializeObject<Dictionary<string, CipherAttachment.MetaData>>(cipher.Attachments);
|
||||||
attachments.Add(attachment.AttachmentId, JsonConvert.DeserializeObject<CipherAttachment.MetaData>(attachment.AttachmentData));
|
var metaData = JsonConvert.DeserializeObject<CipherAttachment.MetaData>(attachment.AttachmentData);
|
||||||
|
attachments[attachment.AttachmentId] = metaData;
|
||||||
cipher.Attachments = JsonConvert.SerializeObject(attachments);
|
cipher.Attachments = JsonConvert.SerializeObject(attachments);
|
||||||
await dbContext.SaveChangesAsync();
|
await dbContext.SaveChangesAsync();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user