Fix bitrix gmail sync (#2918)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov 2023-04-07 15:35:59 +06:00 committed by GitHub
parent cab96e795d
commit 4b091fa868
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -244,7 +244,7 @@ export async function syncDocument (
valValue.attachedTo = id valValue.attachedTo = id
} else { } else {
// Update document id, for existing document. // Update document id, for existing document.
valValue.attachedTo = resultDoc.document._id valValue.attachedTo = attachedTo
} }
const existingIdx = existingByClass.findIndex((it) => { const existingIdx = existingByClass.findIndex((it) => {
const bdoc = hierarchy.as<Doc, BitrixSyncDoc>(it, bitrix.mixin.BitrixSyncDoc) const bdoc = hierarchy.as<Doc, BitrixSyncDoc>(it, bitrix.mixin.BitrixSyncDoc)