diff options
Diffstat (limited to 'models/repo/repo_unit.go')
-rw-r--r-- | models/repo/repo_unit.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/models/repo/repo_unit.go b/models/repo/repo_unit.go index da3e19dece..dd85ca9186 100644 --- a/models/repo/repo_unit.go +++ b/models/repo/repo_unit.go @@ -13,6 +13,7 @@ import ( "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/timeutil" + "code.gitea.io/gitea/modules/util" "xorm.io/xorm" "xorm.io/xorm/convert" @@ -33,6 +34,10 @@ func (err ErrUnitTypeNotExist) Error() string { return fmt.Sprintf("Unit type does not exist: %s", err.UT.String()) } +func (err ErrUnitTypeNotExist) Unwrap() error { + return util.ErrNotExist +} + // RepoUnit describes all units of a repository type RepoUnit struct { //revive:disable-line:exported ID int64 |