fix: allow initial reservation for seated events#29467
Conversation
The else branch incorrectly set shouldReserveSlot=false when no existing booking was found (bookingWithAttendees undefined), blocking the first reservation attempt for seated events. Also changed the truthy check to !== undefined so 0 attendees enters the seat-check logic correctly.
|
Welcome to Cal.diy, @pranavv00! Thanks for opening this pull request. A few things to keep in mind:
A maintainer will review your PR soon. Thanks for contributing! |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR refines the slot reservation logic in 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
This PR has been marked as stale due to inactivity. If you're still working on it or need any help, please let us know or update the PR to keep it active. |
Summary
Fixes #29448 where seated event slot reservations could incorrectly fail for the very first booking attempt.
Changes
shouldReserveSlot = falsewhen no existing booking was foundbookingAttendeesLength !== undefinedinstead of relying on truthinessResult
Slot reservations now remain allowed when no booking exists yet, while still correctly preventing reservations once the seat limit is reached.