Decode plot data from bytestring to utf-8 before storing in database #14
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.
Short description of the changes:
When storing plot data from a request to Live Data Server, we need to decode the plot data from bytestring to UTF-8 first.
Long description of the changes:
After deploying the latest version of Live Data Server, new plots that are published to Live Data Server appear on monitor.sns.gov with '\n' instead of linebreaks:
This seems related to a Django 2.0 change in how bytestrings are handled: https://docs.djangoproject.com/en/5.0/releases/2.0/#removed-support-for-bytestrings-in-some-places
Check list for the pull request
Check list for the reviewer
Manual test for the reviewer
Define environment variables (set the hidden values to any strings you like):
Start the containers:
and when the containers are up run the unit test:
References
Defect 5534: Live Data Server plot html string encoding issue