fix(caldav): check if vtodo contains any components
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
Resolves https://vikunja.sentry.io/share/issue/1ae2fd1601aa40dea4aee41927cfcf78/
This commit is contained in:
parent
741370b613
commit
00a96663ba
|
@ -95,6 +95,9 @@ func ParseTaskFromVTODO(content string) (vTask *models.Task, err error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
if len(parsed.Components) == 0 {
|
||||||
|
return nil, errors.New("VTODO element does seem not contain any components")
|
||||||
|
}
|
||||||
vTodo, ok := parsed.Components[0].(*ics.VTodo)
|
vTodo, ok := parsed.Components[0].(*ics.VTodo)
|
||||||
if !ok {
|
if !ok {
|
||||||
return nil, errors.New("VTODO element not found")
|
return nil, errors.New("VTODO element not found")
|
||||||
|
|
Loading…
Reference in New Issue