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

Validate booking slot's weekday in schedule timezone. (Fixes #735) #744

Merged
merged 3 commits into from
Nov 18, 2024

Conversation

MelissaAutumn
Copy link
Member

@MelissaAutumn MelissaAutumn commented Nov 16, 2024

Fixes #735

Fixes a case where the date could overflow to a day of the week which the schedule has disabled. Which would fail booking slot validation.

This is because days of the week are saved based on the user/schedule's timezone rather than UTC. Which is a little confusing and we should maybe look into fixing that, but this is a quick fix for now.

@MelissaAutumn MelissaAutumn self-assigned this Nov 16, 2024
Copy link
Collaborator

@devmount devmount left a comment

Choose a reason for hiding this comment

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

Thank you for fixing this and providing a test 👏🏻 Just two minor suggestions.

backend/src/appointment/routes/schedule.py Outdated Show resolved Hide resolved
backend/test/unit/test_utils.py Show resolved Hide resolved
@MelissaAutumn MelissaAutumn merged commit 8094904 into main Nov 18, 2024
4 checks passed
@MelissaAutumn MelissaAutumn deleted the bugs/735-fix-timezone-nonsense branch November 18, 2024 16:20
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.

"The time slot you have selected could not be found" error
2 participants