Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny committed May 28, 2022
1 parent 4f56237 commit 407ac14
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions models/repo_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -550,14 +550,14 @@ func SearchRepositoryByCondition(opts *SearchRepoOptions, cond builder.Cond, loa
}

func withDB() *builder.Builder {
switch setting.Database.Type {
case "sqlite3":
switch {
case setting.Database.UseSQLite3:
return builder.Dialect(builder.SQLITE)
case "mysql":
case setting.Database.UseMySQL:
return builder.Dialect(builder.MYSQL)
case "postgres":
case setting.Database.UsePostgreSQL:
return builder.Dialect(builder.POSTGRES)
case "mssql":
case setting.Database.UseMSSQL:
return builder.Dialect(builder.MSSQL)
}
return &builder.Builder{}
Expand Down

0 comments on commit 407ac14

Please sign in to comment.