Use context for RepositoryList.LoadAttributes
(#23435)
This commit is contained in:
parent
cdc9e91750
commit
d74a7efb60
3 changed files with 5 additions and 9 deletions
|
@ -31,7 +31,7 @@ func listUserRepos(ctx *context.APIContext, u *user_model.User, private bool) {
|
|||
return
|
||||
}
|
||||
|
||||
if err := repos.LoadAttributes(); err != nil {
|
||||
if err := repos.LoadAttributes(ctx); err != nil {
|
||||
ctx.Error(http.StatusInternalServerError, "RepositoryList.LoadAttributes", err)
|
||||
return
|
||||
}
|
||||
|
|
|
@ -117,7 +117,7 @@ func getNotifications(ctx *context.Context) {
|
|||
return
|
||||
}
|
||||
notifications = notifications.Without(failures)
|
||||
if err := repos.LoadAttributes(); err != nil { // TODO
|
||||
if err := repos.LoadAttributes(ctx); err != nil {
|
||||
ctx.ServerError("LoadAttributes", err)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue