fix(migration): trello: only fetch attachments when the card actually has attachments

This commit is contained in:
kolaente 2024-04-09 13:25:03 +02:00
parent ee3d20e1d2
commit 994aaeb920
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 5 additions and 3 deletions

View File

@ -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 {