mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-06 23:16:52 +02:00
Improve performance of dashboard list orgs (#16099)
* Improve performance of dashboard list orgs * Fix wrong error description * unexport queryUserOrgIDs method * SimpleOrg -> MinimalOrg * . Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
1 parent
1295e750b4
commit
5d113bdd19
2 files changed
+23
-3
No files matched your search
@@ -49,11 +49,12 @@ func getDashboardContextUser(ctx *context.Context) *models.User {
|
||||
}
|
||||
ctx.Data["ContextUser"] = ctxUser
|
||||
|
||||
if err := ctx.User.GetOrganizations(&models.SearchOrganizationsOptions{All: true}); err != nil {
|
||||
ctx.ServerError("GetOrganizations", err)
|
||||
orgs, err := models.GetUserOrgsList(ctx.User.ID)
|
||||
if err != nil {
|
||||
ctx.ServerError("GetUserOrgsList", err)
|
||||
return nil
|
||||
}
|
||||
ctx.Data["Orgs"] = ctx.User.Orgs
|
||||
ctx.Data["Orgs"] = orgs
|
||||
|
||||
return ctxUser
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user