1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-11 18:24:43 +02:00

Desktop: Fix: Notes would appear to be in the wrong notebook after having been shared

This commit is contained in:
Laurent Cozic 2021-06-23 14:37:51 +01:00
parent b92ab2b8cc
commit 96931877cf

View File

@ -329,7 +329,7 @@ export default class Folder extends BaseItem {
// Find all the notes where the share_id is not the same as the
// parent share_id because we only need to update those.
const rows = await this.db().selectAll(`
SELECT notes.id, folders.share_id
SELECT notes.id, folders.share_id, notes.parent_id
FROM notes
LEFT JOIN folders ON notes.parent_id = folders.id
WHERE notes.share_id != folders.share_id
@ -339,6 +339,7 @@ export default class Folder extends BaseItem {
await Note.save({
id: row.id,
share_id: row.share_id || '',
parent_id: row.parent_id,
updated_time: Date.now(),
}, { autoTimestamp: false });
}