From 5d52475acbbce7faa7a2ef76830f081cfcbbeede Mon Sep 17 00:00:00 2001 From: hmacr Date: Sun, 27 Apr 2025 18:49:58 +0530 Subject: [PATCH] fix: Store Linear workspace logo only when it's available --- plugins/linear/server/api/linear.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/plugins/linear/server/api/linear.ts b/plugins/linear/server/api/linear.ts index 033c2fde88..db8469b176 100644 --- a/plugins/linear/server/api/linear.ts +++ b/plugins/linear/server/api/linear.ts @@ -106,12 +106,14 @@ router.get( { transaction } ); - transaction.afterCommit(async () => { - await UploadLinearWorkspaceLogoTask.schedule({ - integrationId: integration.id, - logoUrl: workspace.logoUrl, + if (workspace.logoUrl) { + transaction.afterCommit(async () => { + await UploadLinearWorkspaceLogoTask.schedule({ + integrationId: integration.id, + logoUrl: workspace.logoUrl, + }); }); - }); + } ctx.redirect(LinearUtils.successUrl()); }