From d66b9a46908b83a4d94652a40fd1cd46af11f215 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Wed, 15 Apr 2020 00:16:07 +0200 Subject: [PATCH] Fix Migration 136 (be less aggressive to open pulls missing git files) (#11072) * be less aggressife to open pulls when migrating * remove unused --- models/migrations/v136.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/models/migrations/v136.go b/models/migrations/v136.go index 115861f344..da5706258e 100644 --- a/models/migrations/v136.go +++ b/models/migrations/v136.go @@ -42,12 +42,6 @@ func addCommitDivergenceToPulls(x *xorm.Engine) error { for _, pr := range results { divergence, err := pull_service.GetDiverging(pr) if err != nil { - if err = pr.LoadIssue(); err != nil { - return fmt.Errorf("pr.LoadIssue()[%d]: %v", pr.ID, err) - } - if !pr.Issue.IsClosed { - return fmt.Errorf("GetDiverging: %v", err) - } log.Warn("Could not recalculate Divergence for pull: %d", pr.ID) pr.CommitsAhead = 0 pr.CommitsBehind = 0