From 8a71bd9f6a749f6a5b0e5ea8686cbd340da90a81 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Thu, 12 Dec 2024 14:48:00 +0800 Subject: [PATCH] Update models/repo/fork.go Co-authored-by: Zettat123 --- models/repo/fork.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/repo/fork.go b/models/repo/fork.go index 73797199628..b69c539ccce 100644 --- a/models/repo/fork.go +++ b/models/repo/fork.go @@ -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