-
Notifications
You must be signed in to change notification settings - Fork 343
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: Update validation for Daily Round form #1898
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1898 +/- ##
===========================================
- Coverage 62.19% 62.07% -0.13%
===========================================
Files 221 221
Lines 12203 12235 +32
Branches 1742 1755 +13
===========================================
+ Hits 7590 7595 +5
- Misses 4305 4329 +24
- Partials 308 311 +3 ☔ View full report in Codecov by Sentry. |
@sainak Can you check the PR? |
if "temperature" in validated: | ||
if validated["temperature"] < 95 or validated["temperature"] > 106: | ||
raise ValidationError( | ||
{"temperature": ["This field value must be between 95 and 106."]} | ||
) | ||
|
||
if "additional_symptoms" in validated: | ||
if SymptomChoiceDict["OTHERS"] in validated["additional_symptoms"]: | ||
if "other_symptoms" not in validated: | ||
raise ValidationError( | ||
{ | ||
"other_symptoms": [ | ||
"This field is required if OTHERS is selected in Additional Symptoms." | ||
] | ||
} | ||
) |
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.
use field level validation
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.
Done
@aeswibon missing validation for other fields |
698a2c1
to
1f4c3e0
Compare
@sainak I have added the validation |
Bug Fix
Proposed Changes
Merge Checklist
/docs
Only PR's with test cases included and passing lint and test pipelines will be reviewed
@coronasafe/care-backend-maintainers @coronasafe/care-backend-admins