aboutsummaryrefslogtreecommitdiff
path: root/routers/web/repo/issue_label.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/repo/issue_label.go')
-rw-r--r--routers/web/repo/issue_label.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/routers/web/repo/issue_label.go b/routers/web/repo/issue_label.go
index d4fece9f0..31bf85fed 100644
--- a/routers/web/repo/issue_label.go
+++ b/routers/web/repo/issue_label.go
@@ -11,6 +11,7 @@ import (
"code.gitea.io/gitea/models/organization"
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/context"
+ "code.gitea.io/gitea/modules/label"
"code.gitea.io/gitea/modules/log"
repo_module "code.gitea.io/gitea/modules/repository"
"code.gitea.io/gitea/modules/web"
@@ -41,8 +42,8 @@ func InitializeLabels(ctx *context.Context) {
}
if err := repo_module.InitializeLabels(ctx, ctx.Repo.Repository.ID, form.TemplateName, false); err != nil {
- if repo_module.IsErrIssueLabelTemplateLoad(err) {
- originalErr := err.(repo_module.ErrIssueLabelTemplateLoad).OriginalError
+ if label.IsErrTemplateLoad(err) {
+ originalErr := err.(label.ErrTemplateLoad).OriginalError
ctx.Flash.Error(ctx.Tr("repo.issues.label_templates.fail_to_load_file", form.TemplateName, originalErr))
ctx.Redirect(ctx.Repo.RepoLink + "/labels")
return