fetch tasks for caldav lists (#641)
Fix shadowed error Panic if a TaskCollection.ReadAll does not return []*models.Task Fetch tasks for caldav lists Co-authored-by: kolaente <k@knt.li> Co-authored-by: konrad <konrad@kola-entertainments.de> Co-authored-by: Martin Giger <martin@humanoids.be> Reviewed-on: https://kolaente.dev/vikunja/api/pulls/641 Co-Authored-By: freaktechnik <martin@humanoids.be> Co-Committed-By: freaktechnik <martin@humanoids.be>
This commit is contained in:
@ -26,11 +26,11 @@ import (
|
||||
"github.com/laurent22/ical-go"
|
||||
)
|
||||
|
||||
func getCaldavTodosForTasks(list *models.List) string {
|
||||
func getCaldavTodosForTasks(list *models.List, listTasks []*models.Task) string {
|
||||
|
||||
// Make caldav todos from Vikunja todos
|
||||
var caldavtodos []*caldav.Todo
|
||||
for _, t := range list.Tasks {
|
||||
for _, t := range listTasks {
|
||||
|
||||
duration := t.EndDate.Sub(t.StartDate)
|
||||
|
||||
|
Reference in New Issue
Block a user