remove ignore no repo error

This commit is contained in:
yp05327 2023-09-06 07:22:48 +00:00
parent 34734c2265
commit 7fa0362d36
1 changed files with 3 additions and 5 deletions

View File

@ -142,12 +142,10 @@ func (b *Branch) LoadPusher(ctx context.Context) (err error) {
}
func (b *Branch) LoadRepo(ctx context.Context) (err error) {
if b.Repo == nil && b.RepoID > 0 {
b.Repo, err = repo_model.GetRepositoryByID(ctx, b.RepoID)
if repo_model.IsErrRepoNotExist(err) {
err = nil
}
if b.Repo != nil && b.RepoID == 0 {
return nil
}
b.Repo, err = repo_model.GetRepositoryByID(ctx, b.RepoID)
return err
}