fix: don't get favorite task projects filter multiple times
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
kolaente 2023-04-03 20:53:27 +02:00
parent 9321b81979
commit be5faf6a81
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 0 additions and 17 deletions

View File

@ -407,23 +407,6 @@ func getRawTasksForProjects(s *xorm.Session, projects []*Project, a web.Auth, op
}
if hasFavoritesProject {
// Make sure users can only see their favorites
userProjects, _, _, err := getRawProjectsForUser(
s,
&projectOptions{
user: &user.User{ID: a.GetID()},
page: -1,
},
)
if err != nil {
return nil, 0, 0, err
}
userProjectIDs := make([]int64, 0, len(userProjects))
for _, l := range userProjects {
userProjectIDs = append(userProjectIDs, l.ID)
}
// All favorite tasks for that user
favCond := builder.
Select("entity_id").