Update models/repo/fork.go

Co-authored-by: Zettat123 <zettat123@gmail.com>
This commit is contained in:
Lunny Xiao 2024-12-12 14:48:00 +08:00 committed by GitHub
parent 82ca99db2d
commit 8a71bd9f6a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -28,7 +28,7 @@ func GetForkedRepo(ctx context.Context, ownerID, repoID int64) (*Repository, err
Get(repo)
if err != nil {
return nil, err
} else if has {
} else if !has {
return nil, ErrRepoNotExist{ID: repoID}
}
return repo, nil