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

Catch/prevent null values in chargeLimits #452

Merged
merged 3 commits into from
May 26, 2022
Merged

Catch/prevent null values in chargeLimits #452

merged 3 commits into from
May 26, 2022

Conversation

MikeBishop
Copy link
Collaborator

In debugging #451, it appears there's a way for the outside limit to be saved as null. The first commit should prevent any exceptions being thrown when that process encounters one that's already stored.

The second heads off the path that looks like it could store a null/None in a particular corner case: Vehicle reports ready, but updating location fails. Rather than storing the result and checking whether location was successful at multiple places, it just bails if the location couldn't be updated. It will run again shortly anyway.

There's also a surprisingly long path through the logic for a car that was and remains absent, and I'm not sure it doesn't update the data stored in settings. I added a short-circuit for that case, just to be safe.

@MikeBishop
Copy link
Collaborator Author

@ngardiner, these failures look unrelated to this change. Can I disregard the tests here and merge, or is there something that needs more attention?

@MikeBishop MikeBishop merged commit 3c1f6ff into main May 26, 2022
@ngardiner
Copy link
Owner

Hi @MikeBishop - feel free to go ahead and merge anything you had queued despite these build errors, it looks like there's an error introduced with a recent dependency that was added, I'll need to work out why and to fix it

@MikeBishop MikeBishop deleted the check_null branch September 2, 2022 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants