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

Prevent creation of bed with the same name #736

Merged
merged 1 commit into from
Jul 3, 2022

Conversation

iamsdas
Copy link
Contributor

@iamsdas iamsdas commented May 11, 2022

Prevent the creation of a bed, if a bed with the same name exists in that location.
Fixes: #2282

@iamsdas iamsdas requested a review from a team as a code owner May 11, 2022 14:43
@iamsdas iamsdas requested a review from vigneshhari May 11, 2022 14:45
Copy link
Member

@vigneshhari vigneshhari left a comment

Choose a reason for hiding this comment

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

This validation should be written in the validate method, these validations can also be written at the model level which might make more sense.

@iamsdas
Copy link
Contributor Author

iamsdas commented May 16, 2022

@vigneshhari
I updated the PR to add the validations in the model level (using the clean method) and made some minor changes so that DRF can handle these Django validation errors.

@gitguardian
Copy link

gitguardian bot commented May 20, 2022

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
Once a secret has been leaked into a git repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Our GitHub checks need improvements? Share your feedbacks!

care/facility/models/bed.py Outdated Show resolved Hide resolved
@vigneshhari
Copy link
Member

resolve the conflicts and we are good to merge.

@vigneshhari vigneshhari merged commit 1f49c47 into ohcnetwork:master Jul 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bed Management
2 participants