From 994aaeb9201e3bf284a8f186fafccbae0c9b8db8 Mon Sep 17 00:00:00 2001 From: kolaente Date: Tue, 9 Apr 2024 13:25:03 +0200 Subject: [PATCH] fix(migration): trello: only fetch attachments when the card actually has attachments --- pkg/modules/migration/trello/trello.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg/modules/migration/trello/trello.go b/pkg/modules/migration/trello/trello.go index b5f0558d0d..0c76eae0ad 100644 --- a/pkg/modules/migration/trello/trello.go +++ b/pkg/modules/migration/trello/trello.go @@ -173,9 +173,11 @@ func fillCardData(client *trello.Client, board *trello.Board) (err error) { continue } - card.Attachments, err = card.GetAttachments(allArg) - if err != nil { - return + if card.Badges.Attachments > 0 { + card.Attachments, err = card.GetAttachments(allArg) + if err != nil { + return + } } if len(card.IDCheckLists) > 0 {