Skip to content

Build your personal knowledge base with Trilium Notes

fix setting becca's utcDateModified after marking as deleted

zadam99cc4078c638
diff --git a/src/becca/entities/abstract_entity.js b/src/becca/entities/abstract_entity.js
index f982bf98d3..e88c6fb701 100644
--- a/src/becca/entities/abstract_entity.js
+++ b/src/becca/entities/abstract_entity.js
@@ -103,9 +103,11 @@ class AbstractEntity {
const entityId = this[this.constructor.primaryKeyName];
const entityName = this.constructor.entityName;
+ this.utcDateModified = dateUtils.utcNowDateTime();
+
sql.execute(`UPDATE ${entityName} SET isDeleted = 1, deleteId = ?, utcDateModified = ?
WHERE ${this.constructor.primaryKeyName} = ?`,
- [deleteId, dateUtils.utcNowDateTime(), entityId]);
+ [deleteId, this.utcDateModified, entityId]);
if (this.dateModified) {
sql.execute(`UPDATE ${entityName} SET dateModified = ? WHERE ${this.constructor.primaryKeyName} = ?`,