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 device message to stop confusing multiple schedules #231

Merged
merged 7 commits into from Nov 8, 2021

Conversation

Flix6x
Copy link
Contributor

@Flix6x Flix6x commented Nov 6, 2021

No description provided.

@Flix6x Flix6x added bug Something isn't working API labels Nov 6, 2021
@Flix6x Flix6x requested a review from nhoening November 6, 2021 09:00
@Flix6x Flix6x self-assigned this Nov 6, 2021
Copy link
Contributor

@nhoening nhoening left a comment

Choose a reason for hiding this comment

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

I believe this would be great to have tested. Is that quite difficult?

flexmeasures/api/v1_3/implementations.py Show resolved Hide resolved
@Flix6x
Copy link
Contributor Author

Flix6x commented Nov 6, 2021

The subquery is timely-beliefs functionality modified here to fit our old data model. It is tested in timely-beliefs (in test_belief_query). I now added an inline todo explaining how this code should be replaced when moving to our new data model.

@Flix6x Flix6x added this to the 0.7.1 milestone Nov 6, 2021
@Flix6x Flix6x merged commit 4386501 into main Nov 8, 2021
@Flix6x Flix6x deleted the bug-device-message-combine-multiple-schedules branch November 8, 2021 11:53
Flix6x added a commit that referenced this pull request Nov 8, 2021
…ules (#231)

Fixed the *getDeviceMessage* endpoint for cases in which there are multiple schedules available, by returning only the most recent one.

* Query for most recent schedule only

* Fix subquery in get_device_message

* One more fix of subquery in get_device_message

* Add inline comment

* Add todo for moving to the new data model

* Changelog entry

* API changelog entry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants