Web: Fixes #16633: Fix sync (#16634)

This commit is contained in:
Henry Heino authored and GitHub committed 2026-09-25 12:01:44 +01:00
1 parent 6e28b0a40d
commit 4978154dc1
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -772,7 +772,7 @@ export default class BaseItem extends BaseModel {
// 'SELECT * FROM [ITEMS] items JOIN sync_items s ON s.item_id = items.id WHERE sync_target = ? AND'
let extraWhere: string[]|string = [];
if (className === 'Note') extraWhere.push('(is_conflict = 0 OR (conflict_original_id != "" AND share_id = ""))');
if (className === 'Note') extraWhere.push('(is_conflict = 0 OR (conflict_original_id != \'\' AND share_id = \'\'))');
if (className === 'Resource') extraWhere.push('encryption_blob_encrypted = 0');
if (ItemClass.encryptionSupported()) extraWhere.push('encryption_applied = 0');
+1 -1
View File
@@ -587,7 +587,7 @@ export default class Note extends BaseItem {
}
public static async syncIneligibleConflictedCount() {
const r = await this.db().selectOne('SELECT count(*) as total FROM notes WHERE is_conflict = 1 AND (conflict_original_id = "" OR share_id != "")');
const r = await this.db().selectOne('SELECT count(*) as total FROM notes WHERE is_conflict = 1 AND (conflict_original_id = \'\' OR share_id != \'\')');
return r && r.total ? r.total : 0;
}