fix(migration): only download uploaded attachments
continuous-integration/drone/push Build is passing Details

This commit is contained in:
kolaente 2024-03-10 18:41:37 +01:00
parent 22dcedcd7d
commit 0057ac5836
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 1 additions and 1 deletions

View File

@ -305,7 +305,7 @@ func convertTrelloDataToVikunja(trelloData []*trello.Board, token string) (fullV
log.Debugf("[Trello Migration] Downloading %d card attachments from card %s", len(card.Attachments), card.ID)
}
for _, attachment := range card.Attachments {
if attachment.MimeType == "" { // Attachments can also be not downloadable - the mime type is empty in that case.
if !attachment.IsUpload { // There are other types of attachments which are not files. We can only handle files.
log.Debugf("[Trello Migration] Attachment %s does not have a mime type, not downloading", attachment.ID)
continue
}