mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-05-28 11:14:54 -04:00
fix: load attributes before converting to api struct
Specifically this load the primary language of the repository.
This commit is contained in:
parent
e30d4ef5da
commit
dedf0790ee
1 changed files with 4 additions and 0 deletions
|
|
@ -24,6 +24,10 @@ func ToRepo(ctx stdCtx.Context, repo *repo_model.Repository, permissionInRepo ac
|
|||
}
|
||||
|
||||
func innerToRepo(ctx stdCtx.Context, repo *repo_model.Repository, permissionInRepo access_model.Permission, isParent bool) *api.Repository {
|
||||
if err := repo.LoadAttributes(ctx); err != nil {
|
||||
log.Error("Unable to load attributes for repo[id=%d]: %w", repo.ID, err)
|
||||
}
|
||||
|
||||
var parent *api.Repository
|
||||
|
||||
if permissionInRepo.Units == nil && permissionInRepo.UnitsMode == nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue