From b5557a7650101c2b4da2f520e7033ea6b53f99cf Mon Sep 17 00:00:00 2001 From: wlame Date: Wed, 3 Jan 2024 14:12:00 +0100 Subject: [PATCH] Fix iterating over paginated resource. The filediffs is the `ListResource` instance, which iterates only for the first `self.num_items` files. And that is only the first page. While the `all_items` property explicitly goes through `self.all_pages` in a first place. --- bot/reviewbot/processing/review.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/reviewbot/processing/review.py b/bot/reviewbot/processing/review.py index 2f491ae..e0cab77 100644 --- a/bot/reviewbot/processing/review.py +++ b/bot/reviewbot/processing/review.py @@ -673,7 +673,7 @@ def __init__(self, api_root, review_request_id, diff_revision, settings): review_request_id=self.review_request_id, diff_revision=self.diff_revision) - for filediff in filediffs: + for filediff in filediffs.all_items: # Filter out binary files and symlinks. if (getattr(filediff, 'binary', False) or filediff.status not in self._VALID_FILEDIFF_STATUS_TYPES or