aboutsummaryrefslogtreecommitdiff
path: root/internal/db/pull.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/db/pull.go')
-rw-r--r--internal/db/pull.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/db/pull.go b/internal/db/pull.go
index b1f751b8..7d5a9bec 100644
--- a/internal/db/pull.go
+++ b/internal/db/pull.go
@@ -621,11 +621,6 @@ func (pr *PullRequest) UpdateCols(cols ...string) error {
// UpdatePatch generates and saves a new patch.
func (pr *PullRequest) UpdatePatch() (err error) {
- if pr.HeadRepo == nil {
- log.Trace("PullRequest[%d].UpdatePatch: ignored corrupted data", pr.ID)
- return nil
- }
-
headGitRepo, err := git.Open(pr.HeadRepo.RepoPath())
if err != nil {
return fmt.Errorf("open repository: %v", err)
@@ -759,6 +754,11 @@ func (prs PullRequestList) LoadAttributes() error {
func addHeadRepoTasks(prs []*PullRequest) {
for _, pr := range prs {
+ if pr.HeadRepo == nil {
+ log.Trace("addHeadRepoTasks[%d]: missing head repository", pr.ID)
+ continue
+ }
+
log.Trace("addHeadRepoTasks[%d]: composing new test task", pr.ID)
if err := pr.UpdatePatch(); err != nil {
log.Error("UpdatePatch: %v", err)