aboutsummaryrefslogtreecommitdiff
path: root/internal/db/repos.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/db/repos.go')
-rw-r--r--internal/db/repos.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/db/repos.go b/internal/db/repos.go
index bcab7dbd..cac50b76 100644
--- a/internal/db/repos.go
+++ b/internal/db/repos.go
@@ -29,7 +29,7 @@ func (db *repos) GetByName(ownerID int64, name string) (*Repository, error) {
repo := new(Repository)
err := db.Where("owner_id = ? AND lower_name = ?", ownerID, strings.ToLower(name)).First(repo).Error
if err != nil {
- if err == gorm.ErrRecordNotFound {
+ if gorm.IsRecordNotFoundError(err) {
return nil, ErrRepoNotExist{args: map[string]interface{}{"ownerID": ownerID, "name": name}}
}
return nil, err