Browse Source

update

tags/v1.22.1.3
chenyifan01 4 years ago
parent
commit
80f949c14d
2 changed files with 1 additions and 2 deletions
  1. +0
    -1
      models/repo.go
  2. +1
    -1
      models/repo_list.go

+ 0
- 1
models/repo.go View File

@@ -947,7 +947,6 @@ func isRepositoryExist(e Engine, u *User, repoName string, alias string) (bool,
cond = cond.And(builder.Eq{"lower_name": repoName})
}
count, err := e.Where(cond).Count(&Repository{})
//todo 确定从 && 改成 || 是否有问题
return count > 0 || com.IsDir(RepoPath(u.Name, repoName)), err
}



+ 1
- 1
models/repo_list.go View File

@@ -321,7 +321,7 @@ func SearchRepositoryCondition(opts *SearchRepoOptions) builder.Cond {
var likes = builder.NewCond()
for _, v := range strings.Split(opts.Keyword, ",") {
likes = likes.Or(builder.Like{"lower_name", strings.ToLower(v)})
likes = likes.Or(builder.Like{"alias", strings.ToLower(v)})
likes = likes.Or(builder.Like{"alias", v})
if opts.IncludeDescription {
likes = likes.Or(builder.Like{"LOWER(description)", strings.ToLower(v)})
}


Loading…
Cancel
Save