From 41bbb4b47f329eb067935ff02609be4a69dc04f8 Mon Sep 17 00:00:00 2001 From: Charles Bochet Date: Fri, 21 Feb 2025 00:20:34 +0100 Subject: [PATCH] Fix upgrade command 0.42 --- .../modules/ui/input/components/TextInputV2.tsx | 2 +- .../0-42/0-42-migrate-rich-text-field.command.ts | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/packages/twenty-front/src/modules/ui/input/components/TextInputV2.tsx b/packages/twenty-front/src/modules/ui/input/components/TextInputV2.tsx index 79460bb40..56d6272a0 100644 --- a/packages/twenty-front/src/modules/ui/input/components/TextInputV2.tsx +++ b/packages/twenty-front/src/modules/ui/input/components/TextInputV2.tsx @@ -189,7 +189,7 @@ const TextInputV2Component = forwardRef< LeftIcon, autoComplete, maxLength, - sizeVariant = 'md', + sizeVariant = 'lg', inheritFontStyles = false, dataTestId, autoGrow = false, diff --git a/packages/twenty-server/src/database/commands/upgrade-version/0-42/0-42-migrate-rich-text-field.command.ts b/packages/twenty-server/src/database/commands/upgrade-version/0-42/0-42-migrate-rich-text-field.command.ts index c45b06bac..3cc3edb78 100644 --- a/packages/twenty-server/src/database/commands/upgrade-version/0-42/0-42-migrate-rich-text-field.command.ts +++ b/packages/twenty-server/src/database/commands/upgrade-version/0-42/0-42-migrate-rich-text-field.command.ts @@ -403,9 +403,19 @@ export class MigrateRichTextFieldCommand extends ActiveWorkspacesCommandRunner { return null; } - return await serverBlockNoteEditor.blocksToMarkdownLossy( - jsonParsedblocknoteFieldValue, - ); + let markdown: string | null = null; + + try { + markdown = await serverBlockNoteEditor.blocksToMarkdownLossy( + jsonParsedblocknoteFieldValue, + ); + } catch (error) { + this.logger.warn( + `Error converting blocknote to markdown for ${blocknoteFieldValue}`, + ); + } + + return markdown; } private async migrateToNewRichTextFieldsColumn({