Remove obsolete JSON format support from Live Data Server #57
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:
Removed the obsolete JSON data format option for publishing plot data. The server now only accepts HTML format data. The
data_typefield remains in the database model for backward compatibility but is effectively always set to 1 (HTML).Long description of the changes:
This PR addresses issues with the fragile JSON format detection logic (the
<divstring check inget_data_type_from_data()method) that caused problems with REF_M data processing.Changes made:
DATA_TYPESconstant from{"json": 0, "html": 1}to{"html": 1}/update/json/)/upload_user_data/and/list/)get_data_type_from_data()andget_data_type_from_string()helper methods_store()function to always use HTML data typestore_user_data()from view utilitiesThe database schema remains unchanged - the
data_typefield is preserved to avoid migration complexity and maintain backward compatibility with existing data.Check list for the pull request
Check list for the reviewer
Manual test for the reviewer
docker compose up -dpixi shellthenpytestReferences
<divstring detection