mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 02:45:54 +01:00
content migration fixes
This commit is contained in:
@@ -58,7 +58,7 @@ async function sync() {
|
||||
};
|
||||
}
|
||||
else {
|
||||
log.info("sync failed: " + e.message);
|
||||
log.info("sync failed: " + e.message + e.stack);
|
||||
|
||||
return {
|
||||
success: false,
|
||||
@@ -262,6 +262,12 @@ async function getEntityRow(entityName, entityId) {
|
||||
|
||||
const entity = await sql.getRow(`SELECT * FROM ${entityName} WHERE ${primaryKey} = ?`, [entityId]);
|
||||
|
||||
if (!entity) {
|
||||
console.log(entityName, entityId);
|
||||
|
||||
console.log(`SELECT * FROM ${entityName} WHERE ${primaryKey} = '${entityId}'`);
|
||||
}
|
||||
|
||||
if (['note_contents', 'note_revisions'].includes(entityName) && entity.content !== null) {
|
||||
if (typeof entity.content === 'string') {
|
||||
entity.content = Buffer.from(entity.content, 'UTF-8');
|
||||
|
||||
Reference in New Issue
Block a user