fix: don't get favorite task projects filter multiple times
continuous-integration/drone/pr Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
This commit is contained in:
parent
9321b81979
commit
be5faf6a81
|
@ -407,23 +407,6 @@ func getRawTasksForProjects(s *xorm.Session, projects []*Project, a web.Auth, op
|
||||||
}
|
}
|
||||||
|
|
||||||
if hasFavoritesProject {
|
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
|
// All favorite tasks for that user
|
||||||
favCond := builder.
|
favCond := builder.
|
||||||
Select("entity_id").
|
Select("entity_id").
|
||||||
|
|
Loading…
Reference in New Issue