Skip to content

Commit e94b5ac

Browse files
committed
fix(server): edited notes listing automatically generated hidden notes (closes #5683)
1 parent 5d0669b commit e94b5ac

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

apps/server/src/routes/api/revisions.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,14 +152,14 @@ function restoreRevision(req: Request) {
152152
}
153153

154154
function getEditedNotesOnDate(req: Request) {
155-
const noteIds = sql.getColumn<string>(
156-
`
155+
const noteIds = sql.getColumn<string>(/*sql*/`\
157156
SELECT notes.*
158157
FROM notes
159158
WHERE noteId IN (
160159
SELECT noteId FROM notes
161-
WHERE notes.dateCreated LIKE :date
162-
OR notes.dateModified LIKE :date
160+
WHERE
161+
(notes.dateCreated LIKE :date OR notes.dateModified LIKE :date)
162+
AND (noteId NOT LIKE '_%')
163163
UNION ALL
164164
SELECT noteId FROM revisions
165165
WHERE revisions.dateLastEdited LIKE :date

0 commit comments

Comments
 (0)