|
|
@@ -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) |
|
|
|