aboutsummaryrefslogtreecommitdiff
path: root/models/repo.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2017-03-23 14:27:34 -0400
committerUnknwon <u@gogs.io>2017-03-23 14:27:34 -0400
commitbeee6e03b15e594f396fb2fb769b58e543ef1794 (patch)
tree471a20e88e3ee8c1bfcd39d6bef2f420ed618287 /models/repo.go
parent902372067cad9cfe7360473d1b985217a308a949 (diff)
error: move ErrRepoNotExist -> errors.RepoNotExist
Diffstat (limited to 'models/repo.go')
-rw-r--r--models/repo.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/models/repo.go b/models/repo.go
index 751850d8..0f448ba6 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -1366,7 +1366,7 @@ func DeleteRepository(uid, repoID int64) error {
if err != nil {
return err
} else if !has {
- return ErrRepoNotExist{repoID, uid, ""}
+ return errors.RepoNotExist{repoID, uid, ""}
}
// In case is a organization.
@@ -1503,9 +1503,9 @@ func GetRepositoryByName(ownerID int64, name string) (*Repository, error) {
if err != nil {
return nil, err
} else if !has {
- return nil, ErrRepoNotExist{0, ownerID, name}
+ return nil, errors.RepoNotExist{0, ownerID, name}
}
- return repo, err
+ return repo, repo.LoadAttributes()
}
func getRepositoryByID(e Engine, id int64) (*Repository, error) {
@@ -1514,9 +1514,9 @@ func getRepositoryByID(e Engine, id int64) (*Repository, error) {
if err != nil {
return nil, err
} else if !has {
- return nil, ErrRepoNotExist{id, 0, ""}
+ return nil, errors.RepoNotExist{id, 0, ""}
}
- return repo, nil
+ return repo, repo.loadAttributes(e)
}
// GetRepositoryByID returns the repository by given id if exists.