From 0dc142ff06f3d69c606015134188d14728816523 Mon Sep 17 00:00:00 2001 From: azivner Date: Sat, 23 Dec 2017 23:31:17 -0500 Subject: [PATCH] fix cloning already existing (deleted) node --- routes/api/notes_move.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/api/notes_move.js b/routes/api/notes_move.js index 02f8d17f3..362042478 100644 --- a/routes/api/notes_move.js +++ b/routes/api/notes_move.js @@ -93,7 +93,7 @@ router.put('/:childNoteId/clone-to/:parentNoteId', auth.checkApiAuth, async (req const prefix = req.body.prefix; const sourceId = req.headers.source_id; - const existing = await sql.getFirstValue('SELECT * FROM notes_tree WHERE note_id = ? AND parent_note_id = ?', [childNoteId, parentNoteId]); + const existing = await sql.getFirst('SELECT * FROM notes_tree WHERE note_id = ? AND parent_note_id = ?', [childNoteId, parentNoteId]); if (existing && !existing.is_deleted) { return res.send({