-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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(medusa): add payments default relation to getTotalsRelations #5875
fix(medusa): add payments default relation to getTotalsRelations #5875
Conversation
|
@cyf0e is attempting to deploy a commit to the medusajs Team on Vercel. A member of the Team first needs to authorize it. |
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.
LGTM
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 3 Ignored Deployments
|
@cyf0e please fix the integration tests, so we can merge :) |
@olivermrbl should be good, having trouble running the integration tests locally so cant really validate. sorry about that |
Fixes #5874
This line https://github.com/medusajs/medusa/blob/1c6c759aa895db4a5888257fac1ccadb2ea74162/packages/medusa/src/services/order.ts#L1858C12-L1858C12 in the order service looks to beresponsible for calculating paid_total when you try to retrieve an order with totals.
By default if the user doesnt pass in the "payments" relation manually by himself, the paid total will always be 0 which is probably not the expected behaviour.
Adding the payments relation to default getTotalsRelations fixes this.