Skip to content

Build your personal knowledge base with Trilium Notes

revisions_number_limit

SiriusXTfdf57b6cfae3
diff --git a/src/routes/api/revisions.ts b/src/routes/api/revisions.ts
index 9e1e4ffac8..f4defb64bd 100644
--- a/src/routes/api/revisions.ts
+++ b/src/routes/api/revisions.ts
@@ -114,7 +114,7 @@ function eraseRevision(req: Request) {
}
function eraseAllExcessRevisions() {
- let allNoteIds = sql.getRows('SELECT noteId FROM notes') as { noteId: string }[];
+ let allNoteIds = sql.getRows("SELECT noteId FROM notes WHERE SUBSTRING(noteId, 1, 1) != '_'") as { noteId: string }[];
allNoteIds.forEach(row => {
becca.getNote(row.noteId)?.eraseExcessRevisionSnapshots()
});