From 5abca0927b492a91182980558f8237b04c466946 Mon Sep 17 00:00:00 2001 From: kolaente Date: Wed, 11 Dec 2024 16:51:30 +0100 Subject: [PATCH] fix(caldav): do not crash with error 400 when fetching the list of all projects Because the "all projects" handler is the same as the one to fetch a single project, the handler would fail because no project was specified. However, it should return an empty project instead so that it later fetches all projects. Resolves https://community.vikunja.io/t/http-400-when-trying-to-connect-via-caldav/3054 --- pkg/routes/caldav/handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/routes/caldav/handler.go b/pkg/routes/caldav/handler.go index 65d4dbfbc..e78cef40e 100644 --- a/pkg/routes/caldav/handler.go +++ b/pkg/routes/caldav/handler.go @@ -172,7 +172,7 @@ func EntryHandler(c echo.Context) error { func getProjectFromParam(c echo.Context) (project *models.ProjectWithTasksAndBuckets, err error) { param := c.Param("project") if param == "" { - return nil, echo.ErrBadRequest + return &models.ProjectWithTasksAndBuckets{}, nil } s := db.NewSession()