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

Fix absolute currency units #738

Merged
merged 5 commits into from Jun 26, 2023
Merged

Fix absolute currency units #738

merged 5 commits into from Jun 26, 2023

Conversation

Flix6x
Copy link
Contributor

@Flix6x Flix6x commented Jun 20, 2023

This obvious bug presents itself when trying to show multiple sensors - with different sensor names - in one chart, each with a sensor unit "EUR" (or any other 3-letter currency code). Showing two sensors with the unit "EUR/MWh" does not fail.

File "flexmeasures/flexmeasures/utils/unit_utils.py", line 203, in is_energy_price_unit
    and unit[3] == "/"
IndexError: string index out of range

@Flix6x Flix6x added bug Something isn't working Still Needs Changelog Entry labels Jun 20, 2023
@Flix6x Flix6x added this to the 0.14.1 milestone Jun 20, 2023
@Flix6x Flix6x requested a review from Ahmad-Wahid June 20, 2023 11:12
@Flix6x Flix6x self-assigned this Jun 20, 2023
@Flix6x Flix6x removed the request for review from Ahmad-Wahid June 26, 2023 07:34
@Flix6x Flix6x merged commit 05608e6 into main Jun 26, 2023
5 checks passed
@Flix6x Flix6x deleted the bug/absolute-currency-units branch June 26, 2023 07:47
Flix6x added a commit that referenced this pull request Jun 26, 2023
* fix case when unit is 'EUR' or some other bare currency code without some additional unit like 'EUR/MWh'

Signed-off-by: F.N. Claessen <felix@seita.nl>

* docs: changelog entry

Signed-off-by: F.N. Claessen <felix@seita.nl>

---------

Signed-off-by: F.N. Claessen <felix@seita.nl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant