소스 검색

Migration: drop to long repo topics (#14152)

tags/v1.15.0-dev
6543 3 년 전
부모
커밋
212fa340cf
No account linked to committer's email address
1개의 변경된 파일9개의 추가작업 그리고 0개의 파일을 삭제
  1. 9
    0
      modules/migrations/gitea_uploader.go

+ 9
- 0
modules/migrations/gitea_uploader.go 파일 보기

@@ -154,6 +154,15 @@ func (g *GiteaLocalUploader) Close() {

// CreateTopics creates topics
func (g *GiteaLocalUploader) CreateTopics(topics ...string) error {
// ignore topics to long for the db
c := 0
for i := range topics {
if len(topics[i]) <= 50 {
topics[c] = topics[i]
c++
}
}
topics = topics[:c]
return models.SaveTopics(g.repo.ID, topics...)
}


Loading…
취소
저장