mlco2 / codecarbon

Track emissions from Compute and recommend ways to reduce their impact on the environment.
https://mlco2.github.io/codecarbon
MIT License
1.12k stars 173 forks source link

[API] Fix last_run empty error #367

Closed benoit-cty closed 1 year ago

benoit-cty commented 1 year ago

When a project has no run, the API returns a "400:Bad Request" error. Now it returns 200:OK with an empty json.

As the new test show, the problem exists with other API entries.