1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-22 12:54:53 -05:00

Fix bug where repositories appear unadopted (#15757)

Fix bug where repositories with capital letters in their names appear unadopted.

Fix #15755

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
zeripath 2021-05-07 02:21:34 +01:00 committed by GitHub
parent edb838997c
commit 114c85e6ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -228,7 +228,7 @@ func ListUnadoptedRepositories(query string, opts *models.ListOptions) ([]string
found := false
repoLoop:
for i, repo := range repos {
if repo.Name == name {
if repo.LowerName == name {
found = true
repos = append(repos[:i], repos[i+1:]...)
break repoLoop