aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web/repo/repo.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/repo/repo.go')
-rw-r--r--routers/web/repo/repo.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/web/repo/repo.go b/routers/web/repo/repo.go
index 735bf4fe9f..c70dec6481 100644
--- a/routers/web/repo/repo.go
+++ b/routers/web/repo/repo.go
@@ -14,6 +14,7 @@ import (
"code.gitea.io/gitea/models"
"code.gitea.io/gitea/models/db"
+ "code.gitea.io/gitea/models/unit"
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/graceful"
@@ -144,7 +145,7 @@ func Create(ctx *context.Context) {
templateID := ctx.FormInt64("template_id")
if templateID > 0 {
templateRepo, err := models.GetRepositoryByID(templateID)
- if err == nil && templateRepo.CheckUnitUser(ctxUser, models.UnitTypeCode) {
+ if err == nil && templateRepo.CheckUnitUser(ctxUser, unit.TypeCode) {
ctx.Data["repo_template"] = templateID
ctx.Data["repo_template_name"] = templateRepo.Name
}