From 01162bfc781b1f3d6bfa70196d37cae85cf2cc45 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Wed, 19 Mar 2014 15:46:16 +0800 Subject: [PATCH] remove unused codes --- models/repo.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/models/repo.go b/models/repo.go index 6abfee747a41..cdbb4b5f4a7b 100644 --- a/models/repo.go +++ b/models/repo.go @@ -145,10 +145,7 @@ func CreateRepository(user *User, repoName, desc, repoLang, license string, priv return nil, err } - rawSql := "UPDATE user SET num_repos = num_repos + 1 WHERE id = ?" - if base.Cfg.MustValue("database", "DB_TYPE") == "postgres" { - rawSql = "UPDATE \"user\" SET num_repos = num_repos + 1 WHERE id = ?" - } + rawSql := "UPDATE `user` SET num_repos = num_repos + 1 WHERE id = ?" if _, err = session.Exec(rawSql, user.Id); err != nil { session.Rollback() if err2 := os.RemoveAll(repoPath); err2 != nil {