Browse Source

Merge pull request 'fix-2054' (#2152) from fix-2054 into V20220601

Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/2152
Reviewed-by: lewis <747342561@qq.com>
pull/2168/head
lewis 3 years ago
parent
commit
7819cc2b22
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      models/org.go

+ 5
- 1
models/org.go View File

@@ -160,7 +160,11 @@ func UpdateOrgStatistics() {
has, _ := x.Get(orgStat)

orgStat.NumScore = numScore
if has {

count, err := GetPublicRepositoryCount(&org)
if err != nil || count == 0 {
x.ID(orgStat.ID).Delete(new(OrgStatistic))
} else if has {
x.ID(orgStat.ID).Cols("num_score").Update(&orgStat)
} else {
x.Insert(orgStat)


Loading…
Cancel
Save