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

fix `charts/credits_by_transaction_date/{project_id}` when a project doesn't have any credits in the database #41

Closed andersy005 closed 1 year ago

andersy005 commented 1 year ago

e.g.: https://offsets-db.fly.dev/charts/credits_by_transaction_date/ACR104

this check is incorrect:

https://github.com/carbonplan/offsets-db/blob/1c00685d8f19ec7fd1077da0869d3bd1d7d53987/carbonplan_offsets_db/routers/charts.py#L504-L506