fix: Make sure we get slug to decide things#9727
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Thank you for following the naming conventions! 🙏 |
📦 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! 🙌 |
|
No failed tests 🎉 |
emrysal
left a comment
There was a problem hiding this comment.
L87 needs some feedback, not sure about it; left some nits
| ) { | ||
| // Save it on the metadata so we can use it later | ||
| data.metadata = { | ||
| ...cleanMetadata, |
There was a problem hiding this comment.
This doesn't look right to me.
There was a problem hiding this comment.
I don't understand, that line was never there to begin with 🤔
There was a problem hiding this comment.
Maybe it's a GitHub glitch, because that line actually is in line 87, not after line 76. https://github.com/calcom/cal.com/blob/093ea1f35d1e2b922d332bc93b47e3275d6bb276/packages/trpc/server/routers/viewer/organizations/update.handler.ts#L87
There was a problem hiding this comment.
oh yeah it's line 77 - is that OK? because it is gone and loses all metadata except requestedSlug
e48c327 to
506ac31
Compare
Co-authored-by: zomars <zomars@me.com>
What does this PR do?
Organization update handler was removing slug from everywhere in case the input didn't include it. Wrapping the existing logic just to when slug is present.
Type of change
How should this be tested?
When creating an organization, going through the about step (3rd) was removing the slug as the requested one, resulting in not being able to create teams as it checks the existence of a valid slug.
Mandatory Tasks