From b0c5cd095e0da28e21a934be723ff37da31e1798 Mon Sep 17 00:00:00 2001 From: Joseph H Kennedy Date: Sat, 14 Dec 2024 16:39:38 -0500 Subject: [PATCH] handle paging in DataGranules.load method --- earthaccess/search.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/earthaccess/search.py b/earthaccess/search.py index 6f5992e5..2d394010 100644 --- a/earthaccess/search.py +++ b/earthaccess/search.py @@ -938,8 +938,9 @@ def doi(self, doi: str) -> Self: return self def load(self, count: int = -1): - # TODO - Handle paging (get all) - self.granules = self.get(count) + if count > 0: + self.granules = self.get(count) + self.granules = self.get_all() @property def granules(self) -> list: