From a240d5dfa7e261f2fb703cf24b1ba4dc6aa47bfd Mon Sep 17 00:00:00 2001 From: wackbyte Date: Fri, 26 Jan 2024 09:15:57 -0500 Subject: [PATCH] Fix non-alphabetic sorting of repo topics (#28938) --- models/repo/topic.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/repo/topic.go b/models/repo/topic.go index b71f43bc8..79b13e320 100644 --- a/models/repo/topic.go +++ b/models/repo/topic.go @@ -366,7 +366,7 @@ func syncTopicsInRepository(sess db.Engine, repoID int64) error { topicNames := make([]string, 0, 25) if err := sess.Table("topic").Cols("name"). Join("INNER", "repo_topic", "repo_topic.topic_id = topic.id"). - Where("repo_topic.repo_id = ?", repoID).Desc("topic.repo_count").Find(&topicNames); err != nil { + Where("repo_topic.repo_id = ?", repoID).Asc("topic.name").Find(&topicNames); err != nil { return err }