-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
fix: booking error in case of no calendar credential but stray destinationCalendar #12680
fix: booking error in case of no calendar credential but stray destinationCalendar #12680
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
4 Ignored Deployments
|
Current dependencies on/for this PR: This stack of pull requests is managed by Graphite. |
Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link to collect XP and win prizes! |
@@ -574,24 +569,16 @@ export default class EventManager { | |||
(c) => c.type === destination.integration | |||
); | |||
// It might not be the first connected calendar as it seems that the order is not guaranteed to be ascending of credentialId. | |||
const firstCalendarCredential = destinationCalendarCredentials[0]; | |||
const firstCalendarCredential = destinationCalendarCredentials[0] as |
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.
It could be undefined as well. So, explicitly assert it as TypeScript by default can't do that.
}) | ||
); | ||
|
||
createdEvents.push(await createEvent(firstCalendarCredential, event)); |
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.
We can't use firstCalendarCredential
if it's undefined. So, this code was supposed to be in else
Current Playwright Test Results Summary✅ 7 Passing - Run may still be in progress, this comment will be updated as current testing workflow or job completes... (Last updated on 12/05/2023 04:16:02pm UTC) Run DetailsRunning Workflow PR Update on Github Actions Commit: 3616036 Started: 12/05/2023 04:15:25pm UTC
|
Test Case | Last 7 days Failures | Last 7 days Flakes |
---|---|---|
Organization should be able to create an organization and complete onboarding
Retry 1 • Initial Attempt |
18.94% (57)57 / 301 runsfailed over last 7 days |
60.13% (181)181 / 301 runsflaked over last 7 days |
📦 Next.js Bundle Analysis for @calcom/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
6f2b40f
to
3616036
Compare
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.
didn't test but code looks good to me
What does this PR do?
Fixes #12464
Type of change
How should this be tested?
Mandatory Tasks
Checklist