diff --git a/pkg/routes/caldav/listStorageProvider.go b/pkg/routes/caldav/listStorageProvider.go index 0d1692c18..096304dcf 100644 --- a/pkg/routes/caldav/listStorageProvider.go +++ b/pkg/routes/caldav/listStorageProvider.go @@ -130,12 +130,20 @@ func (vcls *VikunjaCaldavListStorage) GetResourcesByList(rpaths []string) ([]dat // So we split the url in parts, take the last one and strip the ".ics" at the end var uids []string for _, path := range rpaths { + if !strings.HasSuffix(path, ".ics") { + // Looks like this is not a task url + continue + } parts := strings.Split(path, "/") uid := []rune(parts[4]) // The 4th part is the id with ".ics" suffix endlen := len(uid) - len(".ics") // ".ics" are 4 bytes uids = append(uids, string(uid[:endlen])) } + if len(uids) == 0 { + return []data.Resource{}, nil + } + s := db.NewSession() defer s.Close()