-
Notifications
You must be signed in to change notification settings - Fork 331
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
Move validate_data to base EMR viewset and add slot_type filter in availability query #2698
Move validate_data to base EMR viewset and add slot_type filter in availability query #2698
Conversation
…_data method and add slot_type filter in availability query
📝 WalkthroughWalkthroughThe pull request introduces two distinct modifications in the EMR API viewsets. First, the Changes
Possibly related PRs
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
care/emr/api/viewsets/base.py
(1 hunks)care/emr/api/viewsets/scheduling/availability.py
(1 hunks)
🔇 Additional comments (1)
care/emr/api/viewsets/scheduling/availability.py (1)
226-227
: The addition ofslot_type
filter is good, but double-check downstream behaviors.Ensuring only
appointment
slots are considered is noteworthy, and presumably aligns with your new logic. You might confirm elsewhere that no other slot types were inadvertently excluded.
def validate_data(self, instance, model_obj=None): | ||
pass | ||
|
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.
🛠️ Refactor suggestion
Consider removing or elaborating this placeholder method.
Currently, validate_data
does nothing and might mislead future maintainers. If it’s truly needed, please implement a real validation routine; otherwise, removing it might keep the codebase simpler.
Proposed Changes
Associated Issue
Architecture changes
Merge Checklist
/docs
Only PR's with test cases included and passing lint and test pipelines will be reviewed
@ohcnetwork/care-backend-maintainers @ohcnetwork/care-backend-admins
Summary by CodeRabbit