fix setNoteToParent and deprecate it

This commit is contained in:
zadam
2019-11-10 19:29:51 +01:00
parent 0837cabb41
commit dea5195223
3 changed files with 20 additions and 8 deletions

View File

@@ -195,7 +195,7 @@ async function findExistencyIssues() {
HAVING
COUNT(*) > 1`,
async ({noteId, parentNoteId}) => {
const branches = await repository.getEntities(`SELECT * FROM branches WHERE noteId = ? and parentNoteId = ? and isDeleted = 1`, [noteId, parentNoteId]);
const branches = await repository.getEntities(`SELECT * FROM branches WHERE noteId = ? and parentNoteId = ? and isDeleted = 0`, [noteId, parentNoteId]);
// it's not necessarily "original" branch, it's just the only one which will survive
const origBranch = branches[0];