summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
Diffstat (limited to 'models')
-rw-r--r--models/pull.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/models/pull.go b/models/pull.go
index 42d93bd541..1895030f75 100644
--- a/models/pull.go
+++ b/models/pull.go
@@ -67,7 +67,11 @@ type PullRequest struct {
// MustHeadUserName returns the HeadRepo's username if failed return blank
func (pr *PullRequest) MustHeadUserName() string {
if err := pr.LoadHeadRepo(); err != nil {
- log.Error("LoadHeadRepo: %v", err)
+ if !IsErrRepoNotExist(err) {
+ log.Error("LoadHeadRepo: %v", err)
+ } else {
+ log.Warn("LoadHeadRepo %d but repository does not exist: %v", pr.HeadRepoID, err)
+ }
return ""
}
return pr.HeadRepo.OwnerName