aboutsummaryrefslogtreecommitdiffstats
path: root/models/repo/redirect.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/repo/redirect.go')
-rw-r--r--models/repo/redirect.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/models/repo/redirect.go b/models/repo/redirect.go
index 88fad6f3e3..f28220c2af 100644
--- a/models/repo/redirect.go
+++ b/models/repo/redirect.go
@@ -10,6 +10,7 @@ import (
"strings"
"code.gitea.io/gitea/models/db"
+ "code.gitea.io/gitea/modules/util"
)
// ErrRedirectNotExist represents a "RedirectNotExist" kind of error.
@@ -28,6 +29,10 @@ func (err ErrRedirectNotExist) Error() string {
return fmt.Sprintf("repository redirect does not exist [uid: %d, name: %s]", err.OwnerID, err.RepoName)
}
+func (err ErrRedirectNotExist) Unwrap() error {
+ return util.ErrNotExist
+}
+
// Redirect represents that a repo name should be redirected to another
type Redirect struct {
ID int64 `xorm:"pk autoincr"`