-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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: Exclude deleted price lists and prices from pricing calculations #9015
fix: Exclude deleted price lists and prices from pricing calculations #9015
Conversation
|
@panalgin 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
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.
good catch! @panalgin
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.
legend @panalgin – thanks for the contribution
Could you merge this ? |
This was fixed in the meantime as part of #9265. |
@fPolic, can we close this? |
Yes |
Hello,
Description of the bug
A bug was discovered in the pricing calculation logic where deleted price lists and prices were still being considered, potentially leading to incorrect pricing information.
Fix implementation
The fix adds two conditions:
calculatePrices
method to ensure only non-deleted price lists are considered.Code changes
Impact and importance
These fixes are crucial for accurate pricing calculations, ensuring that only active, non-deleted price lists and prices are considered.
Testing
Unable to write test cases due to module tests not working, but the fixes have been manually verified.
Additional notes
I'm open to any feedback or suggestions for improvement. Thank you for considering this pull request.
Deleting a price list from this screen:
In the database, the record is deleted but because its status still active, and no-check for deleted_at