-
Notifications
You must be signed in to change notification settings - Fork 5
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 form responses giving error and not inserting values when the boolean value is false #156
Conversation
New PR for #154 (branch rename) |
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.
All tests works fine . No error when the response is false and database is correctly updated for false values
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.
Tests passed and boolean false verified with swagger and prisma studio. One thing I was curious about: in the responseDtoToArray
function, when pushing to the responsesArray, what do the spread operators do?
@JoshuaHinman
which probably did not matter if we have all these values inserted into the database (including nulls), I was trying to convert into the same structure as the input, but I think empty values are undefined coming from the res body, so I don't think we could just leave it as |
|
Description
When response is false, the validation pipe returns an error and the boolean value is also not inserted into the database properly
This is a new PR after renaming #154 as the branch name was causing issue for some members
Issue link
Fixes # (issue)
Type of change
How Has This Been Tested?
ran all the tests, send request from swagger and verified the values in the database
Checklist: