mirror of
https://github.com/bitwarden/server.git
synced 2025-07-01 16:12:49 -05:00
[Bug] Fix cipher clone yielding incorrect RevisionDate (#1031)
* Fix cipher clone yielding incorrect RevisionDate * PR fixes Co-authored-by: Matt Gibson <mdgibson@Matts-MBP.lan>
This commit is contained in:
@ -6,7 +6,7 @@ using System.Collections.Generic;
|
||||
|
||||
namespace Bit.Core.Models.Table
|
||||
{
|
||||
public class Cipher : ITableObject<Guid>
|
||||
public class Cipher : ITableObject<Guid>, ICloneable
|
||||
{
|
||||
private Dictionary<string, CipherAttachment.MetaData> _attachmentData;
|
||||
|
||||
@ -92,5 +92,15 @@ namespace Bit.Core.Models.Table
|
||||
var attachments = GetAttachments();
|
||||
return attachments?.ContainsKey(id) ?? false;
|
||||
}
|
||||
|
||||
object ICloneable.Clone() => Clone();
|
||||
public Cipher Clone()
|
||||
{
|
||||
var clone = CoreHelpers.CloneObject(this);
|
||||
clone.CreationDate = CreationDate;
|
||||
clone.RevisionDate = RevisionDate;
|
||||
|
||||
return clone;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user