Skip to content
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

Don't allow negative values for Doctor Count for facility #1505

Merged
merged 12 commits into from
Dec 7, 2023

Conversation

Pranshu1902
Copy link
Contributor

Proposed Changes

Raise Validation error when user tries to give a negative value for the doctor count for a facility.

Associated Issue

#1504

Merge Checklist

  • Tests added/fixed
  • Update docs in /docs
  • Linting Complete
  • Any other necessary step

Only PR's with test cases included and passing lint and test pipelines will be reviewed

@coronasafe/care-backend-maintainers @coronasafe/care-backend-admins

Copy link
Member

@sainak sainak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use min value validator in the model itself

@sainak sainak linked an issue Aug 3, 2023 that may be closed by this pull request
@Pranshu1902
Copy link
Contributor Author

use min value validator in the model itself

Done!

Copy link
Member

@rithviknishad rithviknishad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No migrations????

@sainak
Copy link
Member

sainak commented Aug 4, 2023

No migrations????

yes migrations will be required

@rithviknishad
Copy link
Member

@Pranshu1902 rebase and then make migrations

@Pranshu1902
Copy link
Contributor Author

Added migrations @sainak @rithviknishad

Signed-off-by: Aakash Singh <mail@singhaakash.dev>
@vigneshhari
Copy link
Member

Switch to https://docs.djangoproject.com/en/4.2/ref/models/fields/#positiveintegerfield

@sainak
Copy link
Member

sainak commented Aug 8, 2023

Switch to docs.djangoproject.com/en/4.2/ref/models/fields/#positiveintegerfield

@Pranshu1902 make sure to handle negative values while migrating

@Pranshu1902
Copy link
Contributor Author

@vigneshhari @sainak updated!

@Pranshu1902
Copy link
Contributor Author

@sainak @vigneshhari please review and merge the PR

@sainak
Copy link
Member

sainak commented Oct 20, 2023

@Pranshu1902 delete and recreate the migrations

@Pranshu1902
Copy link
Contributor Author

@sainak done

@Pranshu1902
Copy link
Contributor Author

@vigneshhari please review and merge the PR

@vigneshhari vigneshhari merged commit c30e5c6 into coronasafe:master Dec 7, 2023
2 of 3 checks passed
sainak added a commit that referenced this pull request Dec 7, 2023
vigneshhari pushed a commit that referenced this pull request Dec 7, 2023
* merge migrations

* fix bad migration from #1505

* fix tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Negative values are allowed in Doctors list count for a facility
4 participants