Skip to content

Commit f52fd70

Browse files
authored
Update models/repo/language_stats.go
Signed-off-by: silverwind <[email protected]>
1 parent 573b40d commit f52fd70

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/repo/language_stats.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ func UpdateLanguageStats(ctx context.Context, repo *Repository, commitID string,
167167
// Update already existing language
168168
if strings.EqualFold(s.Language, lang) {
169169
s.CommitID = commitID
170-
s.IsPrimary = strings.EqualFold(lang, topLang)
170+
s.IsPrimary = lang == topLang
171171
s.Size = size
172172
if _, err := sess.ID(s.ID).Cols("`commit_id`", "`size`", "`is_primary`").Update(s); err != nil {
173173
return err

0 commit comments

Comments
 (0)