From bec6576620a5426c4c592b38e615f8451ba15cc3 Mon Sep 17 00:00:00 2001 From: zadam Date: Sun, 31 Mar 2019 11:27:19 +0200 Subject: [PATCH] fix note cleanup --- src/services/notes.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/notes.js b/src/services/notes.js index 8f49a39d3..e8601c7c2 100644 --- a/src/services/notes.js +++ b/src/services/notes.js @@ -413,9 +413,9 @@ async function cleanupDeletedNotes() { // it's better to not use repository for this because it will complain about saving protected notes // out of protected session - await sql.execute("UPDATE note_contents SET content = NULL WHERE content IS NOT NULL AND noteId IN (SELECT noteId FROM notes WHERE isDeleted = 1 AND notes.dateModified <= ?)", [dateUtils.dateStr(cutoffDate)]); + await sql.execute("UPDATE note_contents SET content = NULL WHERE content IS NOT NULL AND noteId IN (SELECT noteId FROM notes WHERE isDeleted = 1 AND notes.utcDateModified <= ?)", [dateUtils.utcDateStr(cutoffDate)]); - await sql.execute("UPDATE note_revisions SET content = NULL WHERE note_revisions.content IS NOT NULL AND noteId IN (SELECT noteId FROM notes WHERE isDeleted = 1 AND notes.dateModified <= ?)", [dateUtils.dateStr(cutoffDate)]); + await sql.execute("UPDATE note_revisions SET content = NULL WHERE note_revisions.content IS NOT NULL AND noteId IN (SELECT noteId FROM notes WHERE isDeleted = 1 AND notes.utcDateModified <= ?)", [dateUtils.utcDateStr(cutoffDate)]); } sqlInit.dbReady.then(() => {