-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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: validate regions exist for shipping option price update #9364
base: develop
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
6 Skipped Deployments
|
|
ContainerRegistrationKeys.REMOTE_QUERY | ||
) | ||
|
||
let remoteQueryObject = remoteQueryObjectFromString({ |
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.
Q: nothing to do but should we start using the query graph api instead when writing new things?
if (!option.prices) { | ||
return [] | ||
} | ||
return option.prices |
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.
Sug: return option.prices ?? []
}) | ||
|
||
const regionService = container.resolve(Modules.REGION) | ||
const regionList = await regionService.listRegions({ |
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.
Sug: we should probably check the length before calling the service just as a best practice, i think we are handling it under the hood but if a module is replaced it might not always be the case wdyt? Also, it removes a call to the service and we can return early if there is nothing to check
What
updateShippingOptionsWorkflow
andcreateShippingOptionsWorkflow
that validates if the region prices being updated have corresponding regions configured.Why
Fixes CC-542