fetch tasks for caldav lists #641
|
@ -403,16 +403,17 @@ func (vcls *VikunjaCaldavListStorage) getListRessource(isCollection bool) (rr Vi
|
||||||
tk := models.TaskCollection{
|
tk := models.TaskCollection{
|
||||||
ListID: vcls.list.ID,
|
ListID: vcls.list.ID,
|
||||||
}
|
}
|
||||||
var iface interface{}
|
iface, _, _, err := tk.ReadAll(vcls.user, "", 1, 1000)
|
||||||
iface, _, _, err = tk.ReadAll(vcls.user, "", 1, 1000)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
tasks, ok := iface.([]*models.Task)
|
tasks, ok := iface.([]*models.Task)
|
||||||
if ok {
|
if !ok {
|
||||||
listTasks = tasks
|
panic("Tasks returned from TaskCollection.ReadAll are not []*models.Task!")
|
||||||
konrad marked this conversation as resolved
Outdated
|
|||||||
vcls.list.Tasks = tasks
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
listTasks = tasks
|
||||||
|
vcls.list.Tasks = tasks
|
||||||
}
|
}
|
||||||
|
|
||||||
rr = VikunjaListResourceAdapter{
|
rr = VikunjaListResourceAdapter{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user
By design, this should always be true, if it isn't something is wrong with the implementation. Could you add a
panic
in that case? (In anelse
) That way it would be catched in the tests if it fails.Done.