fix(cycle): accept a symptom logged without an intensity - #1003
Merged
Merged
Conversation
Picking a symptom without tapping an intensity is how most of them are logged. The sheet sends severity null for those, the schema took a number or nothing at all, and the day log came back 422 with two issues for two symptoms. All the sheet could say was "Could not save. Try again.", and the cycle saved fine as soon as the symptoms were removed, which sent people looking in the wrong place. Nothing else disagreed: the link row has always stored an unrated symptom as a plain presence, and the writer already maps a non-number to NULL. Only the gate at the door refused it, on both the create and the patch path, and no test touched either schema. Refs #1001
This file contains hidden or 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
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.
Selecting a cycle symptom without tapping an intensity sends
severity: null, which both day-log schemas refused. The request came back 422 and the sheet could only show "Could not save. Try again."; removing the symptoms made the save succeed, which pointed people away from the cause. Reported in #1001.The stored link has always allowed an unrated symptom, and the writer already maps a non-number to NULL, so only the input schema disagreed, on the create and the patch path alike. Neither schema had a test; there is one now, and it fails without the change.