mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 11:56:01 +01:00
attributes are now updated only if their type and name does not change, in case of relation not even value must change. If they do, the old attribute is deleted and new is created instead
This commit is contained in:
@@ -116,6 +116,20 @@ class Attribute extends Entity {
|
||||
delete pojo.isOwned;
|
||||
delete pojo.__note;
|
||||
}
|
||||
|
||||
createClone(type, name, value) {
|
||||
return new Attribute({
|
||||
noteId: this.noteId,
|
||||
type: type,
|
||||
name: name,
|
||||
value: value,
|
||||
position: this.position,
|
||||
isInheritable: this.isInheritable,
|
||||
isDeleted: false,
|
||||
utcDateCreated: this.utcDateCreated,
|
||||
utcDateModified: this.utcDateModified
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Attribute;
|
||||
Reference in New Issue
Block a user