summaryrefslogtreecommitdiffstats
path: root/modules/migrations/migrate.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/migrations/migrate.go')
-rw-r--r--modules/migrations/migrate.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/migrations/migrate.go b/modules/migrations/migrate.go
index 8543a3fc09..191f2a5550 100644
--- a/modules/migrations/migrate.go
+++ b/modules/migrations/migrate.go
@@ -229,7 +229,7 @@ func migrateRepository(downloader base.Downloader, uploader base.Uploader, opts
log.Trace("migrating pull requests and comments")
var prBatchSize = uploader.MaxBatchInsertSize("pullrequest")
for i := 1; ; i++ {
- prs, err := downloader.GetPullRequests(i, prBatchSize)
+ prs, isEnd, err := downloader.GetPullRequests(i, prBatchSize)
if err != nil {
return err
}
@@ -300,7 +300,7 @@ func migrateRepository(downloader base.Downloader, uploader base.Uploader, opts
}
}
- if len(prs) < prBatchSize {
+ if isEnd {
break
}
}