Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider null value in carbonIntensity on EM #575

Merged

Conversation

YaSuenag
Copy link
Contributor

@YaSuenag YaSuenag commented Oct 8, 2024

Pull Request

Issue Number: #571

Summary

Consider null value(s) if it is returned from Electricity Maps.

This PR set -1 to HistoryCarbonIntensityData.Vaule when carbonIntensity in response body from Electricity Maps is null. But I'm not sure it is ok because -1 does not mean null - it might be ok it is documented. Or we can exclude it in filter phase in data source implementation. What do you think?

Changes

  • HistoryCarbonIntensityData.cs

Checklist

  • Local Tests Passing?
  • CICD and Pipeline Tests Passing?
  • Added any new Tests?
  • Documentation Updates Made?
  • Are there any API Changes? If yes, please describe below.
  • This is not a breaking change. If it is, please describe it below.

Are there API Changes?

No

Is this a breaking change?

No

This PR Closes #571

Copy link
Contributor

@vaughanknight vaughanknight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to merge, appreciate the fix!

@vaughanknight vaughanknight merged commit 0afba03 into Green-Software-Foundation:dev Oct 15, 2024
9 checks passed
@YaSuenag YaSuenag deleted the pr/json-null-value branch October 15, 2024 05:49
@danuw danuw added the v1.6.1 label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Cannot get the value of a token type 'Null' as a number
3 participants