mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 13:01:31 +08:00 
			
		
		
		
	fix updating becca after undeleting notes
This commit is contained in:
		
							parent
							
								
									83f8fac088
								
							
						
					
					
						commit
						1dfde76b95
					
				| @ -65,7 +65,7 @@ async function resolveNotePathToSegments(notePath, hoistedNoteId = 'root', logEr | |||||||
| 
 | 
 | ||||||
|             if (!parents.length) { |             if (!parents.length) { | ||||||
|                 if (logErrors) { |                 if (logErrors) { | ||||||
|                     ws.logError(`No parents found for ${childNoteId} (${child.title}) for path ${notePath}`); |                     ws.logError(`No parents found for note ${childNoteId} (${child.title}) for path ${notePath}`); | ||||||
|                 } |                 } | ||||||
| 
 | 
 | ||||||
|                 return; |                 return; | ||||||
|  | |||||||
| @ -634,7 +634,10 @@ function undeleteBranch(branchId, deleteId, taskContext) { | |||||||
|     taskContext.increaseProgressCount(); |     taskContext.increaseProgressCount(); | ||||||
| 
 | 
 | ||||||
|     if (note.isDeleted && note.deleteId === deleteId) { |     if (note.isDeleted && note.deleteId === deleteId) { | ||||||
|         new Note(note).save(); |         // becca entity was already created as skeleton in "new Branch()" above
 | ||||||
|  |         const noteEntity = becca.getNote(note.noteId); | ||||||
|  |         noteEntity.updateFromRow(note); | ||||||
|  |         noteEntity.save(); | ||||||
| 
 | 
 | ||||||
|         const attributes = sql.getRows(` |         const attributes = sql.getRows(` | ||||||
|                 SELECT * FROM attributes  |                 SELECT * FROM attributes  | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 zadam
						zadam