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: timerange for sensor with a single belief #732
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Looks good.
I suggest a change that could optimize the query.
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
victorgarcia98
approved these changes
Jun 20, 2023
Flix6x
added a commit
that referenced
this pull request
Jun 26, 2023
* fix: get sensor data timerange in case of a single data point Signed-off-by: F.N. Claessen <felix@seita.nl> * refactor: move to util function Signed-off-by: F.N. Claessen <felix@seita.nl> * fix: apply fix to sensor timerange, too Signed-off-by: F.N. Claessen <felix@seita.nl> * fix: flake8 Signed-off-by: F.N. Claessen <felix@seita.nl> * use min and max in query 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Loading the asset page or sensor page showed a 500 server error in the browser console, in case of finding out the timerange of a sensor with only a single data point. Pretty rare, but still a bug.
I had to fix this bug in two places, which prompted me to refactor. I wasn't able to put the util function into one of the existing modules in
data/services/
, because of circular imports, so I opted to create a new one, which currently just holds this one util new function.