Skip to content

Commit ff1cfbe

Browse files
authored
Merge pull request #20 from edanalytics/fix/fetch_bug_on_resources_without_read_permission
fixes a bug when fetching resources without read permission
2 parents f09bc71 + 6f4b4b0 commit ff1cfbe

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

lightbeam/fetch.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ async def get_records(self, do_write=True, log_status_counts=True):
3333
record_counts = self.lightbeam.results
3434
self.lightbeam.results = []
3535
for endpoint in self.lightbeam.endpoints:
36-
num_records = [x for x in record_counts if x[0] == endpoint][0][1]
36+
try:
37+
num_records = [x for x in record_counts if x[0] == endpoint][0][1]
38+
except IndexError:
39+
continue
3740
num_pages = math.ceil(num_records / limit)
3841

3942
# do the requests

0 commit comments

Comments
 (0)