Skip to content

Fixes 400 being thrown for NaN on disabling seats#3945

Merged
zomars merged 65 commits intomainfrom
bug/disableSeats400
Sep 1, 2022
Merged

Fixes 400 being thrown for NaN on disabling seats#3945
zomars merged 65 commits intomainfrom
bug/disableSeats400

Conversation

@sean-brydon
Copy link
Copy Markdown
Member

What does this PR do?

Fixes #3944

Environment: Staging(main branch) / Production

Type of change

  • Bug fix (non-breaking change which fixes an issue)

@vercel
Copy link
Copy Markdown

vercel bot commented Aug 24, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
cal ✅ Ready (Inspect) Visit Preview Sep 1, 2022 at 0:47AM (UTC)
swagger ❌ Failed (Inspect) Sep 1, 2022 at 0:47AM (UTC)

Copy link
Copy Markdown
Contributor

@zomars zomars left a comment

Choose a reason for hiding this comment

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

Good solution @sean-brydon but I have some Qs. Why is seatPerTimeSlot is returning as NaN in the first place? My guess is that this is coming upstream in the flow. We can either, prevent the NaN from happening earlier instead of patching down here. My suspicion is a faulty parseInt or something like that.

@sean-brydon
Copy link
Copy Markdown
Member Author

sean-brydon commented Aug 24, 2022

Good solution @sean-brydon but I have some Qs. Why is seatPerTimeSlot is returning as NaN in the first place? My guess is that this is coming upstream in the flow. We can either, prevent the NaN from happening earlier instead of patching down here. My suspicion is a faulty parseInt or something like that.

@zomars Just had a look into this and it appears that we are sending null over the form but for some reason its getting translated to a NaN - looking into this more but I can't seem to figure out why this is happening

@PeerRich
Copy link
Copy Markdown
Member

Good solution @sean-brydon but I have some Qs. Why is seatPerTimeSlot is returning as NaN in the first place? My guess is that this is coming upstream in the flow. We can either, prevent the NaN from happening earlier instead of patching down here. My suspicion is a faulty parseInt or something like that.

@zomars Just had a look into this and it appears that we are sending null over the form but for some reason its getting translated to a NaN - looking into this more but I can't seem to figure out why this is happening

whats the step forward? merge or investigate more=

@PeerRich PeerRich added the ♻️ autoupdate tells kodiak to keep this branch up-to-date label Aug 25, 2022
@sean-brydon
Copy link
Copy Markdown
Member Author

@zomars after digging into this this morning I got nowhere - we send over null via rhf and it ends up in the form state as NaN. Not 100% sure as the type is set as number | null

@manuelmeurer
Copy link
Copy Markdown

Would it be possible to deploy this, so the bug is fixed, and keep looking for a better solution?
If not, is there some workaround to disable seats for an event type in the meantime?

Copy link
Copy Markdown
Contributor

@zomars zomars left a comment

Choose a reason for hiding this comment

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

Merging for now but this general form needs a major refactor

@zomars zomars merged commit 0db1b3f into main Sep 1, 2022
@zomars zomars deleted the bug/disableSeats400 branch September 1, 2022 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

♻️ autoupdate tells kodiak to keep this branch up-to-date

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error deactivating seats in event type

4 participants