DataJunction / dj

A metrics platform.
http://datajunction.io
MIT License
35 stars 15 forks source link

Fix bug in pagination logic for edge case around empty list #1215

Closed shangyian closed 3 weeks ago

shangyian commented 3 weeks ago

Summary

This PR fixes a bug when the pagination logic processes an empty list, which is now covered by the unit test test_find_nodes_paginated_empty_list. Previously this would fail to generate a value for has_next_page due to a list index out of range error, but it should return false.

Test Plan

Deployment Plan

netlify[bot] commented 3 weeks ago

Deploy Preview for thriving-cassata-78ae72 canceled.

Name Link
Latest commit 6c368eb676a6273d36bb723ea7b4141b59d9181e
Latest deploy log https://app.netlify.com/sites/thriving-cassata-78ae72/deploys/671d017dc8ee4500087d1322