mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 19:36:12 +01:00
fix undeleting note when its relation points to yet-undeleted note
This commit is contained in:
@@ -670,7 +670,8 @@ function undeleteBranch(branchId, deleteId, taskContext) {
|
||||
OR (type = 'relation' AND value = ?))`, [deleteId, note.noteId, note.noteId]);
|
||||
|
||||
for (const attribute of attributes) {
|
||||
new BAttribute(attribute).save();
|
||||
// relation might point to a note which hasn't been undeleted yet and would thus throw up
|
||||
new BAttribute(attribute).save({skipValidation: true});
|
||||
}
|
||||
|
||||
const noteAttachments = sql.getRows(`
|
||||
|
||||
Reference in New Issue
Block a user