carbonplan / offsets-db-api

accounting of voluntary and compliance offset programs
https://carbonplan.org/research/offsets-db
MIT License
1 stars 0 forks source link

Refactor `filter_valid_projects` utility function to handle edge cases #60

Closed andersy005 closed 10 months ago

andersy005 commented 10 months ago

this pr fixes a bug in filter_valid_projects function to ensure

queries to return the same thing

before


{
  "pagination": {
    "total_entries": 10,
    "current_page": 1,
    "total_pages": 1,
    "next_page": null
  },
{
  "pagination": {
    "total_entries": 20,
    "current_page": 1,
    "total_pages": 1,
    "next_page": null
  },

after


{
  "pagination": {
    "total_entries": 20,
    "current_page": 1,
    "total_pages": 1,
    "next_page": null
  },
{
  "pagination": {
    "total_entries": 20,
    "current_page": 1,
    "total_pages": 1,
    "next_page": null
  },

cc @katamartin