This commit is contained in:
kekskurse 2024-03-07 11:39:08 +01:00
parent a52a9d67d1
commit adf64dc6ff

View file

@ -68,16 +68,19 @@ func resetDailyTasks(cCtx *cli.Context) error {
log.Debug().Int("number of cards", len(cards)).Msg("Get Cards") log.Debug().Int("number of cards", len(cards)).Msg("Get Cards")
for _, card := range cards { for _, card := range cards {
log.Debug().Str("name", card.Name).Msg("Check")
foundLabel := false foundLabel := false
for _, label := range card.Labels { for _, label := range card.Labels {
if label.ID == dailyLabel.ID { if label.ID == dailyLabel.ID {
foundLabel = true foundLabel = true
log.Debug().Interface("card", card).Msg("Found daily card")
break break
} }
} }
if !foundLabel { if !foundLabel {
break log.Debug().Str("name", card.Name).Msg("Not match")
continue
} }
err = card.MoveToList(todoList.ID, trello.Defaults()) err = card.MoveToList(todoList.ID, trello.Defaults())