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 for bug introduced in PR #491 #498

Merged
merged 2 commits into from Sep 6, 2022

Conversation

Flix6x
Copy link
Contributor

@Flix6x Flix6x commented Sep 6, 2022

This PR fixes a recently introduced bug when viewing the asset page with non-instantaneous sensors.

Without the list(), a Generator object is created, which is used up by the any() call, causing the min() call to crash with:

ValueError: min() arg is an empty sequence

Signed-off-by: F.N. Claessen <felix@seita.nl>
@Flix6x Flix6x added bug Something isn't working UI labels Sep 6, 2022
@Flix6x Flix6x requested a review from nhoening September 6, 2022 10:17
@Flix6x Flix6x self-assigned this Sep 6, 2022
@Flix6x Flix6x added this to the 0.11.2 milestone Sep 6, 2022
@coveralls
Copy link
Collaborator

coveralls commented Sep 6, 2022

Pull Request Test Coverage Report for Build 2999624411

  • 0 of 2 (0.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 65.101%

Changes Missing Coverage Covered Lines Changed/Added Lines %
flexmeasures/data/models/charts/belief_charts.py 0 1 0.0%
flexmeasures/data/models/generic_assets.py 0 1 0.0%
Totals Coverage Status
Change from base Build 2993381884: 0.0%
Covered Lines: 6474
Relevant Lines: 9339

💛 - Coveralls

Signed-off-by: F.N. Claessen <felix@seita.nl>
@Flix6x Flix6x merged commit e20e0c1 into main Sep 6, 2022
@Flix6x Flix6x deleted the fix-value-error-min-arg-is-empty-sequence branch September 6, 2022 11:04
Flix6x added a commit that referenced this pull request Sep 6, 2022
Fix a bug introduced in 0.11.1 when viewing the asset page with non-instantaneous sensors.

* Fix for bug introduced in PR #491

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

* 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 UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants