Merge pull request #8413 from heww/fix-project-summary-api

fix(api,project): fix repo, chart count missing in project summary
This commit is contained in:
He Weiwei 2019-07-26 13:31:39 +08:00 committed by GitHub
commit 1a2c30e094
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -267,7 +267,7 @@ func (p *ProjectAPI) Get() {
err := p.populateProperties(p.project)
if err != nil {
log.Errorf("populate project poroperties failed with : %+v", err)
log.Errorf("populate project properties failed with : %+v", err)
}
p.Data["json"] = p.project
@ -585,6 +585,10 @@ func (p *ProjectAPI) Summary() {
return
}
if err := p.populateProperties(p.project); err != nil {
log.Warningf("populate project properties failed with : %+v", err)
}
summary := &models.ProjectSummary{
RepoCount: p.project.RepoCount,
ChartCount: p.project.ChartCount,