mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-13 03:40:48 +00:00
fix: ignore ydoc migration errors (#6402)
Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
parent
f25866afcf
commit
f1d2d4512c
@ -197,8 +197,12 @@ async function processMigrateMarkupFor (
|
||||
const blob = await storageAdapter.stat(ctx, workspaceId, documentId)
|
||||
// only for documents not in storage
|
||||
if (blob === undefined) {
|
||||
const ydoc = markupToYDoc(value, attribute.name)
|
||||
await saveCollaborativeDoc(storageAdapter, workspaceId, collaborativeDoc, ydoc, ctx)
|
||||
try {
|
||||
const ydoc = markupToYDoc(value, attribute.name)
|
||||
await saveCollaborativeDoc(storageAdapter, workspaceId, collaborativeDoc, ydoc, ctx)
|
||||
} catch (err) {
|
||||
console.error('failed to process document', doc._class, doc._id, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -230,8 +230,12 @@ async function processMigrateContentFor (
|
||||
const blob = await storageAdapter.stat(ctx, client.workspaceId, documentId)
|
||||
// only for documents not in storage
|
||||
if (blob === undefined) {
|
||||
const ydoc = markupToYDoc(value, attribute.name)
|
||||
await saveCollaborativeDoc(storageAdapter, client.workspaceId, collaborativeDoc, ydoc, ctx)
|
||||
try {
|
||||
const ydoc = markupToYDoc(value, attribute.name)
|
||||
await saveCollaborativeDoc(storageAdapter, client.workspaceId, collaborativeDoc, ydoc, ctx)
|
||||
} catch (err) {
|
||||
console.error('failed to process document', doc._class, doc._id, err)
|
||||
}
|
||||
}
|
||||
|
||||
update[attributeName] = collaborativeDoc
|
||||
|
Loading…
Reference in New Issue
Block a user