aboutsummaryrefslogtreecommitdiff
path: root/routers/repo
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2017-04-07 16:00:25 -0400
committerUnknwon <u@gogs.io>2017-04-07 16:00:25 -0400
commit9e3c83372f19853ac1dc164e2fcf58d9779ac0f0 (patch)
tree166972d800ff862afc91120889f0fe0c5fa45854 /routers/repo
parent809db853fa3938885aae98b058ed524b6f4aef84 (diff)
api/repo: improve migration error handling
Diffstat (limited to 'routers/repo')
-rw-r--r--routers/repo/repo.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/repo/repo.go b/routers/repo/repo.go
index 3f99f53c..a50fc937 100644
--- a/routers/repo/repo.go
+++ b/routers/repo/repo.go
@@ -87,7 +87,7 @@ func Create(ctx *context.Context) {
func handleCreateError(ctx *context.Context, owner *models.User, err error, name, tpl string, form interface{}) {
switch {
- case models.IsErrReachLimitOfRepo(err):
+ case errors.IsReachLimitOfRepo(err):
ctx.RenderWithErr(ctx.Tr("repo.form.reach_limit_of_creation", owner.RepoCreationNum()), tpl, form)
case models.IsErrRepoAlreadyExist(err):
ctx.Data["Err_RepoName"] = true