aboutsummaryrefslogtreecommitdiff
path: root/routers/web/repo/release.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/repo/release.go')
-rw-r--r--routers/web/repo/release.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/routers/web/repo/release.go b/routers/web/repo/release.go
index fba3ef7a0..666294631 100644
--- a/routers/web/repo/release.go
+++ b/routers/web/repo/release.go
@@ -519,7 +519,11 @@ func DeleteTag(ctx *context.Context) {
func deleteReleaseOrTag(ctx *context.Context, isDelTag bool) {
if err := releaseservice.DeleteReleaseByID(ctx, ctx.FormInt64("id"), ctx.Doer, isDelTag); err != nil {
- ctx.Flash.Error("DeleteReleaseByID: " + err.Error())
+ if models.IsErrProtectedTagName(err) {
+ ctx.Flash.Error(ctx.Tr("repo.release.tag_name_protected"))
+ } else {
+ ctx.Flash.Error("DeleteReleaseByID: " + err.Error())
+ }
} else {
if isDelTag {
ctx.Flash.Success(ctx.Tr("repo.release.deletion_tag_success"))