From b9a2143831409d043789fd4a6cc023b7d37bc8f3 Mon Sep 17 00:00:00 2001 From: Yaroslav Serhieiev Date: Tue, 3 Dec 2024 08:32:28 +0200 Subject: [PATCH] fix: use negative IDs for community-sourced words --- packages/engine/src/sync/words/Git2Gsheets.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/engine/src/sync/words/Git2Gsheets.ts b/packages/engine/src/sync/words/Git2Gsheets.ts index 868dd2b..979887b 100644 --- a/packages/engine/src/sync/words/Git2Gsheets.ts +++ b/packages/engine/src/sync/words/Git2Gsheets.ts @@ -52,6 +52,10 @@ export class Git2Gsheets extends GSheetsOp { const notes = [[...this._annotate(null, dto)] as string[]]; + // We still use negative IDs for community-sourced words + dto.id = -Math.abs(+dto.id); + dtoAddLang.id = -Math.abs(+dtoAddLang.id); + this.wordsSheet.batch.appendRows({ values: [[...dto]], notes,