fix(projects): do not try to fetch project permissions when no projects exist

Resolves https://vikunja.sentry.io/issues/6572520737/events/2a747d0e53e7431fafca89429c552eae/
This commit is contained in:
kolaente
2025-05-19 18:21:05 +02:00
parent 6b0d6891ce
commit 5acca8144b

View File

@@ -237,6 +237,11 @@ type projectRight struct {
func checkRightsForProjects(s *xorm.Session, u *user.User, projectIDs []int64) (projectRightMap map[int64]*projectRight, err error) {
projectRightMap = make(map[int64]*projectRight)
if len(projectIDs) < 1 {
return
}
args := []interface{}{
u.ID,
u.ID,